/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace IoTFleetWise { namespace Model { /** *

Information about a single controller area network (CAN) signal and the * messages it receives and transmits.

See Also:

AWS * API Reference

*/ class CanSignal { public: AWS_IOTFLEETWISE_API CanSignal(); AWS_IOTFLEETWISE_API CanSignal(Aws::Utils::Json::JsonView jsonValue); AWS_IOTFLEETWISE_API CanSignal& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_IOTFLEETWISE_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The ID of the message.

*/ inline int GetMessageId() const{ return m_messageId; } /** *

The ID of the message.

*/ inline bool MessageIdHasBeenSet() const { return m_messageIdHasBeenSet; } /** *

The ID of the message.

*/ inline void SetMessageId(int value) { m_messageIdHasBeenSet = true; m_messageId = value; } /** *

The ID of the message.

*/ inline CanSignal& WithMessageId(int value) { SetMessageId(value); return *this;} /** *

Whether the byte ordering of a CAN message is big-endian.

*/ inline bool GetIsBigEndian() const{ return m_isBigEndian; } /** *

Whether the byte ordering of a CAN message is big-endian.

*/ inline bool IsBigEndianHasBeenSet() const { return m_isBigEndianHasBeenSet; } /** *

Whether the byte ordering of a CAN message is big-endian.

*/ inline void SetIsBigEndian(bool value) { m_isBigEndianHasBeenSet = true; m_isBigEndian = value; } /** *

Whether the byte ordering of a CAN message is big-endian.

*/ inline CanSignal& WithIsBigEndian(bool value) { SetIsBigEndian(value); return *this;} /** *

Whether the message data is specified as a signed value.

*/ inline bool GetIsSigned() const{ return m_isSigned; } /** *

Whether the message data is specified as a signed value.

*/ inline bool IsSignedHasBeenSet() const { return m_isSignedHasBeenSet; } /** *

Whether the message data is specified as a signed value.

*/ inline void SetIsSigned(bool value) { m_isSignedHasBeenSet = true; m_isSigned = value; } /** *

Whether the message data is specified as a signed value.

*/ inline CanSignal& WithIsSigned(bool value) { SetIsSigned(value); return *this;} /** *

Indicates the beginning of the CAN signal. This should always be the least * significant bit (LSB).

This value might be different from the value in a * DBC file. For little endian signals, startBit is the same value as * in the DBC file. For big endian signals in a DBC file, the start bit is the most * significant bit (MSB). You will have to calculate the LSB instead and pass it as * the startBit.

*/ inline int GetStartBit() const{ return m_startBit; } /** *

Indicates the beginning of the CAN signal. This should always be the least * significant bit (LSB).

This value might be different from the value in a * DBC file. For little endian signals, startBit is the same value as * in the DBC file. For big endian signals in a DBC file, the start bit is the most * significant bit (MSB). You will have to calculate the LSB instead and pass it as * the startBit.

*/ inline bool StartBitHasBeenSet() const { return m_startBitHasBeenSet; } /** *

Indicates the beginning of the CAN signal. This should always be the least * significant bit (LSB).

This value might be different from the value in a * DBC file. For little endian signals, startBit is the same value as * in the DBC file. For big endian signals in a DBC file, the start bit is the most * significant bit (MSB). You will have to calculate the LSB instead and pass it as * the startBit.

*/ inline void SetStartBit(int value) { m_startBitHasBeenSet = true; m_startBit = value; } /** *

Indicates the beginning of the CAN signal. This should always be the least * significant bit (LSB).

This value might be different from the value in a * DBC file. For little endian signals, startBit is the same value as * in the DBC file. For big endian signals in a DBC file, the start bit is the most * significant bit (MSB). You will have to calculate the LSB instead and pass it as * the startBit.

*/ inline CanSignal& WithStartBit(int value) { SetStartBit(value); return *this;} /** *

The offset used to calculate the signal value. Combined with factor, the * calculation is value = raw_value * factor + offset.

*/ inline double GetOffset() const{ return m_offset; } /** *

The offset used to calculate the signal value. Combined with factor, the * calculation is value = raw_value * factor + offset.

*/ inline bool OffsetHasBeenSet() const { return m_offsetHasBeenSet; } /** *

The offset used to calculate the signal value. Combined with factor, the * calculation is value = raw_value * factor + offset.

*/ inline void SetOffset(double value) { m_offsetHasBeenSet = true; m_offset = value; } /** *

The offset used to calculate the signal value. Combined with factor, the * calculation is value = raw_value * factor + offset.

*/ inline CanSignal& WithOffset(double value) { SetOffset(value); return *this;} /** *

A multiplier used to decode the CAN message.

*/ inline double GetFactor() const{ return m_factor; } /** *

A multiplier used to decode the CAN message.

*/ inline bool FactorHasBeenSet() const { return m_factorHasBeenSet; } /** *

A multiplier used to decode the CAN message.

*/ inline void SetFactor(double value) { m_factorHasBeenSet = true; m_factor = value; } /** *

A multiplier used to decode the CAN message.

*/ inline CanSignal& WithFactor(double value) { SetFactor(value); return *this;} /** *

How many bytes of data are in the message.

*/ inline int GetLength() const{ return m_length; } /** *

How many bytes of data are in the message.

*/ inline bool LengthHasBeenSet() const { return m_lengthHasBeenSet; } /** *

How many bytes of data are in the message.

*/ inline void SetLength(int value) { m_lengthHasBeenSet = true; m_length = value; } /** *

How many bytes of data are in the message.

*/ inline CanSignal& WithLength(int value) { SetLength(value); return *this;} /** *

The name of the signal.

*/ inline const Aws::String& GetName() const{ return m_name; } /** *

The name of the signal.

*/ inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } /** *

The name of the signal.

*/ inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; } /** *

The name of the signal.

*/ inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } /** *

The name of the signal.

*/ inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); } /** *

The name of the signal.

*/ inline CanSignal& WithName(const Aws::String& value) { SetName(value); return *this;} /** *

The name of the signal.

*/ inline CanSignal& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} /** *

The name of the signal.

*/ inline CanSignal& WithName(const char* value) { SetName(value); return *this;} private: int m_messageId; bool m_messageIdHasBeenSet = false; bool m_isBigEndian; bool m_isBigEndianHasBeenSet = false; bool m_isSigned; bool m_isSignedHasBeenSet = false; int m_startBit; bool m_startBitHasBeenSet = false; double m_offset; bool m_offsetHasBeenSet = false; double m_factor; bool m_factorHasBeenSet = false; int m_length; bool m_lengthHasBeenSet = false; Aws::String m_name; bool m_nameHasBeenSet = false; }; } // namespace Model } // namespace IoTFleetWise } // namespace Aws