DbcLib 1.0
CAN DBC C++ library.
Loading...
Searching...
No Matches
Public Member Functions | List of all members
dbc::Signal Class Reference

Interface against a DBC signal configuration. More...

#include <signal.h>

Public Member Functions

virtual ~Signal ()
 Destructor.
 
void Name (const std::string &name)
 Sets the signal name.
 
const std::string & Name () const
 Returns the signal name.
 
void Unit (const std::string &unit)
 Sets the unit of measure.
 
const std::string & Unit () const
 Returns the unit of measure.
 
void Comment (const std::string &comment)
 Sets the descriptive text.
 
const std::string & Comment () const
 Returns the descriptive text.
 
void DataType (SignalDataType type)
 Sets the data type.
 
SignalDataType DataType () const
 Returns the data type.
 
std::string DataTypeAsString () const
 Returns the data type as text.
 
void Mux (MuxType type)
 Sets the multiplexer type.
 
MuxType Mux () const
 Returns the multiplexer type.
 
std::string MuxAsString () const
 Returns the multiplexer type as text.
 
void MuxValue (int value)
 Sets the multiplexor value.
 
int MuxValue () const
 Returns the multiplexor value.
 
void BitStart (size_t start)
 Sets the start bit.
 
size_t BitStart () const
 Returns the start bit.
 
void BitLength (size_t length)
 Sets the bit length.
 
size_t BitLength () const
 Returns the bit length.
 
void LittleEndian (bool endian)
 Set true if little endian byte order.
 
bool LittleEndian () const
 Return true if little endian byte order.
 
void Scale (double scale)
 Sets the scaling constant.
 
double Scale () const
 Scaling constant.
 
void Offset (double offset)
 Sets the offset.
 
double Offset () const
 Return offset.
 
void Min (double min)
 Sets min range.
 
double Min () const
 Min range.
 
void Max (double max)
 Sets the max range.
 
double Max () const
 Max range.
 
void EnumList (const std::map< int64_t, std::string > &enum_list)
 Sets the enumeration.
 
const std::map< int64_t, std::string > & EnumList () const
 Returns the enumeration.
 
void Receivers (const std::vector< std::string > &receiver_list)
 Sets the receiver list.
 
const std::vector< std::string > & Receivers () const
 Return the receiver list.
 
const std::vector< Attribute > & Attributes () const
 Returns the attribute list.
 
void MessageId (uint64_t message_id)
 Sets the signals message ID.
 
uint64_t MessageId () const
 Returns the message ID that the signal belongs to.
 
bool IsMultiplexed () const
 True if multiplexed signal.
 
AttributeCreateAttribute (const Attribute &definition)
 Creates an attribute.
 
ExtendedMuxGetExtendedMux ()
 Creates an extended multiplexor struct.
 
std::string GetEnumString (int64_t index) const
 Returns the enumerate text for an index.
 
void ParseMessage (const std::vector< uint8_t > &message, uint64_t ns1970, uint32_t can_id)
 Parse out the signal value from a message data buffer.
 
void ResetSampleCounter () const
 Resets the sample counter.
 
void StepSampleCounter () const
 Steps the sample counter.
 
size_t SampleCounter () const
 Returns the sample counter.
 
void SampleTime (uint64_t ns1970)
 Sets the sample time.
 
uint64_t SampleTime () const
 Returns the sample time.
 
void SampleCanId (uint32_t can_id)
 Sets the CAN ID for the sample.
 
uint64_t SampleCanId () const
 Returns the CAN ID for latest sample.
 
void Valid (bool valid)
 Set to true if valid value.
 
bool Valid () const
 Trie if value is valid.
 
template<typename T >
bool ChannelValue (T &value) const
 Returns the channel value.
 
template<typename T >
bool EngValue (T &value) const
 Returns the scaled engineering value.
 
void AttachObserver (ISampleObserver *observer) const
 Attach a sample observer.
 
void DetachObserver (const ISampleObserver *observer) const
 Detach a sample observer.
 
template<>
bool ChannelValue (std::string &value) const
 Returns the signal value as a string.
 
template<>
bool ChannelValue (SignalValue &value) const
 Returns the signal value as a signal value.
 
template<>
bool EngValue (std::string &value) const
 Returns the engineering value as a string value.
 

Detailed Description


The documentation for this class was generated from the following file: