Defines a MDF channel (CN) block.
|
virtual void | Name (const std::string &name)=0 |
| Sets channel name.
|
|
virtual std::string | Name () const =0 |
| Returns channel name.
|
|
virtual void | DisplayName (const std::string &name)=0 |
| Sets display name.
|
|
virtual std::string | DisplayName () const =0 |
| Display name.
|
|
virtual void | Description (const std::string &description)=0 |
| Sets the description.
|
|
virtual std::string | Description () const =0 |
| Returns the description.
|
|
virtual void | Unit (const std::string &unit)=0 |
| Sets unit string or or the MIME text string.
|
|
virtual std::string | Unit () const =0 |
| Returns the unit string or the MIME content type string.
|
|
virtual void | Flags (uint32_t flags) |
| Sets channel flags. Flags are defined in the CnFlag namespace
|
|
virtual uint32_t | Flags () const |
| Channel flags are defined in the CnFlag namespace
|
|
virtual bool | IsUnitValid () const =0 |
| True if unit exists.
|
|
virtual void | Type (ChannelType type)=0 |
| Sets the type of channel.
|
|
virtual ChannelType | Type () const =0 |
| Type of channel.
|
|
virtual void | Sync (ChannelSyncType type) |
| Sets the type of sync.
|
|
virtual ChannelSyncType | Sync () const |
| Type of sync.
|
|
virtual void | DataType (ChannelDataType type)=0 |
| Sets the data type.
|
|
virtual ChannelDataType | DataType () const =0 |
| Data type.
|
|
virtual void | DataBytes (uint64_t nof_bytes)=0 |
| Sets the data size (bytes)
|
|
virtual uint64_t | DataBytes () const =0 |
| Data size (bytes);.
|
|
virtual void | Decimals (uint8_t precision) |
| Sets number of decimals (floating points only)
|
|
virtual uint8_t | Decimals () const =0 |
| Number of decimals (floating points)
|
|
virtual bool | IsDecimalUsed () const =0 |
| Returns true if decimals is used
|
|
virtual void | Range (double min, double max) |
| Sets the ranges.
|
|
virtual std::optional< std::pair< double, double > > | Range () const |
| Returns the ranges.
|
|
virtual void | Limit (double min, double max) |
| Sets the limits.
|
|
virtual std::optional< std::pair< double, double > > | Limit () const |
| Returns the limits.
|
|
virtual void | ExtLimit (double min, double max) |
| Sets the extended limits.
|
|
virtual std::optional< std::pair< double, double > > | ExtLimit () const |
| Returns the extended limits.
|
|
virtual void | SamplingRate (double sampling_rate)=0 |
| Sets the sample rate (s). This is a MDF 3 feature.
|
|
virtual double | SamplingRate () const =0 |
| Returns the sample rate (s). This is a MDF 3 feature.
|
|
virtual ISourceInformation * | SourceInformation () const |
| Returns the source information, if any.
|
|
virtual ISourceInformation * | CreateSourceInformation () |
| Creates a source information block.
|
|
virtual IChannelArray * | ChannelArray () const |
| Returns the channel array object if any exist in this channel.
|
|
virtual IChannelArray * | CreateChannelArray () |
| Create or returns an existing channel array (CA) block.
|
|
virtual IChannelConversion * | ChannelConversion () const =0 |
| Returns the conversion block, if any.
|
|
virtual IChannelConversion * | CreateChannelConversion ()=0 |
| Creates a conversion block.
|
|
virtual IChannel * | CreateChannelComposition ()=0 |
| Creates a composition channel.
|
|
virtual IChannel * | CreateChannelComposition (const std::string_view &name) |
| Creates a composition channel with a specific name or returns an existing channel.
|
|
virtual std::vector< IChannel * > | ChannelCompositions ()=0 |
| Creates a composition channel.
|
|
bool | IsNumber () const |
| Returns true if the channel is a number.
|
|
virtual IMetaData * | CreateMetaData () |
| Creates a metadata (MD) block.
|
|
virtual IMetaData * | MetaData () const |
| Returns the meta-data (MD) block if it exist.
|
|
virtual void | AddAttachmentReference (const IAttachment *attachment) |
| Adds an attachment reference to the channel.
|
|
virtual std::vector< const IAttachment * > | AttachmentList () const |
| Returns a list of attachment pointers.
|
|
void | VlsdRecordId (uint64_t record_id) const |
| Sets the VLSD record id.
|
|
uint64_t | VlsdRecordId () const |
| Returns the VLSD record id.
|
|
template<typename T > |
bool | GetChannelValue (const std::vector< uint8_t > &record_buffer, T &dest, uint64_t array_index=0) const |
| Parse out the channel value from a data record.
|
|
template<typename T > |
void | SetChannelValue (const T &value, bool valid=true, uint64_t array_index=0) |
| Sets a channel value.
|
|
template<typename T > |
void | SetChannelValues (const std::vector< T > &values) |
| Sets channel array values.
|
|
bool | GetUnsignedValue (const std::vector< uint8_t > &record_buffer, uint64_t &dest, uint64_t array_index=0) const |
| Internally used function mainly for fetching VLSD index values.
|
|
virtual bool | GetTextValue (const std::vector< uint8_t > &record_buffer, std::string &dest) const |
| Internally used function mainly for fetching VLSD text values.
|
|
void | SetTimestamp (double timestamp, std::vector< uint8_t > &record_buffer) const |
| The function change the supplied records time channel value.
|
|
virtual void | BitCount (uint32_t bits)=0 |
| Sets the size of data in bits.
|
|
virtual uint32_t | BitCount () const =0 |
| Returns the data size in number of bits.
|
|
virtual void | BitOffset (uint16_t bits)=0 |
| Sets the offset to data in bits.
|
|
virtual uint16_t | BitOffset () const =0 |
| Returns offset to data (0..7).
|
|
virtual void | ByteOffset (uint32_t bytes)=0 |
| Sets the byte offset in record to to data.
|
|
virtual uint32_t | ByteOffset () const =0 |
| Returns the byte offset to data in the record.
|
|
virtual const IChannelGroup * | ChannelGroup () const =0 |
| Support function that returns its channel group.
|
|
uint64_t | RecordId () const |
| Returns th channel group (CG) record ID.
|
|
void | CalculateMasterTime (bool calculate_master) |
| Defines if the master channel time should be calculated or not.
|
|
bool | CalculateMasterTime () const |
| Defines if the master channel time is calculated or user defined.
|
|
void | ArraySize (uint64_t array_size) |
| Sets the array size for the channel.
|
|
uint64_t | ArraySize () const |
| Returns 1 if no array and > 1 if it is an array.
|
|
template<> |
bool | GetChannelValue (const std::vector< uint8_t > &record_buffer, std::vector< uint8_t > &dest, uint64_t array_index) const |
| Support function that gets an array value from a record buffer.
|
|
template<> |
bool | GetChannelValue (const std::vector< uint8_t > &record_buffer, std::string &dest, uint64_t array_index) const |
| Support function that gets a string value from a record buffer.
|
|
template<> |
void | SetChannelValue (const std::string &value, bool valid, uint64_t array_index) |
| Support function that sets a string value to a record buffer.
|
|
template<> |
void | SetChannelValue (const std::vector< uint8_t > &values, bool valid, uint64_t array_index) |
| Support function that sets a string value to a record buffer.
|
|
virtual | ~IBlock ()=default |
| Default destructor.
|
|
virtual int64_t | Index () const =0 |
| File position within the file.
|
|
virtual std::string | BlockType () const =0 |
| Returns the block type.
|
|
|
bool | GetSignedValue (const std::vector< uint8_t > &record_buffer, int64_t &dest, uint64_t array_index) const |
| Support function that get signed integer from a record.
|
|
bool | GetFloatValue (const std::vector< uint8_t > &record_buffer, double &dest, uint64_t array_index) const |
| Support function that get float values from a record.
|
|
virtual bool | GetByteArrayValue (const std::vector< uint8_t > &record_buffer, std::vector< uint8_t > &dest) const |
| Support function that get array values from a record.
|
|
bool | GetCanOpenDate (const std::vector< uint8_t > &record_buffer, uint64_t &dest) const |
| Support function that get CANOpen date values from a record.
|
|
bool | GetCanOpenTime (const std::vector< uint8_t > &record_buffer, uint64_t &dest) const |
| Support function that get CANOpen time values from a record.
|
|
virtual std::vector< uint8_t > & | SampleBuffer () const =0 |
| Support function that gets the channel group sample buffer.
|
|
virtual void | SetValid (bool valid, uint64_t array_index) |
| Support function that sets the valid flag.
|
|
virtual bool | GetValid (const std::vector< uint8_t > &record_buffer, uint64_t array_index) const |
| Support function that return true if the valid bit is set.
|
|
void | SetUnsignedValueLe (uint64_t value, bool valid, uint64_t array_index) |
| Support function that sets unsigned little endian values.
|
|
void | SetUnsignedValueBe (uint64_t value, bool valid, uint64_t array_index) |
| Support function that sets unsigned big endian values.
|
|
void | SetSignedValueLe (int64_t value, bool valid, uint64_t array_index) |
| Support function that sets signed little endian values.
|
|
void | SetSignedValueBe (int64_t value, bool valid, uint64_t array_index) |
| Support function that sets signed big endian values.
|
|
void | SetFloatValueLe (double value, bool valid, uint64_t array_index) |
| Support function that sets float little endian values.
|
|
void | SetFloatValueBe (double value, bool valid, uint64_t array_index) |
| Support function that sets float big endian values.
|
|
virtual void | SetTextValue (const std::string &value, bool valid) |
| Support function that sets text values.
|
|
virtual void | SetByteArray (const std::vector< uint8_t > &value, bool valid) |
| Support function that sets array values.
|
|