BusBricks: Frame Class Reference
BusBricks  0.1
Customize bus-communication
Loading...
Searching...
No Matches
Frame Class Referenceabstract

Frame-Class as derived class from Content The derived classes define: -the conversion from a given payload plus protocol-specific parameters (e.g. Modbus-function-code, addresses...) to the frame-representation (override of content_to_rep from Content-Class) More...

#include <Frame.h>

Inheritance diagram for Frame:
[legend]
Collaboration diagram for Frame:
[legend]

Public Member Functions

 Frame ()
 Construct a new empty Frame object.
 
 ~Frame ()
 Destroy the Frame object.
 
 Frame (String *pdu)
 Constructor for creating Frame-instance from pdu (Content)
 
 Frame (CharArray *frame)
 Constructor for creating Frame-Object from byte-frame (Representation)
 
virtual uint8_t getServiceId ()=0
 Get the ServiceId, the PDU of the Frame belongs to (necessary for Service-multiplexing). The Extraction of the Service-Id from the Frame is protocoll-specific and has to be implemented in the derived class.
 
- Public Member Functions inherited from Content< String, CharArray >
 Content (String content)
 Construct a new Content object from an instance from type content_type (content itself)
 
 Content (CharArray representation)
 Construct a new Content object from it's representation from type representation_type.
 
CharArrayget_representation ()
 Get the address of the informations representation of type representation-type.
 
Stringget_content ()
 Get the address of the informations content of type content_type.
 
bool isValid ()
 Representation and Content of the object are existent (not default)
 

Additional Inherited Members

- Protected Member Functions inherited from Content< String, CharArray >
virtual void rep_to_content ()=0
 Defines the mapping from Representation to Content. Convert the class-attribute "representation" to the class-attribute "content". (has to be defined in derived class) (has to be called in the constructor of the derived class)
 
virtual void content_to_rep ()=0
 Defines the mapping from Content to Representation. Convert the class-attribute "content"to the class-attribute "representation" . (has to be defined in derived class) (has to be called in the constructor of the derived class)
 
- Protected Attributes inherited from Content< String, CharArray >
String content
 Content of an information (view on information (content) closer to Service-Layer)

 
CharArray representation
 Representation of an information (view on information (content) closer to physical layer)

 

Detailed Description

Frame-Class as derived class from Content The derived classes define: -the conversion from a given payload plus protocol-specific parameters (e.g. Modbus-function-code, addresses...) to the frame-representation (override of content_to_rep from Content-Class)

Author
Felix Schuelke (flxsc.nosp@m.ode@.nosp@m.gmail.nosp@m..com)
  • the extraction of protocol-specific parameters from the byte-representation (frame) with eventually checking their validity (e.g. CRC) (override of rep_to_content from Content-Class In the abstract concept of "Content" the byte-Frame itself is interpreted as the Content-Representation The "Content"-Object represents the PDU transmitted to the services
Template Parameters
Stringtype of Payload of the frame ("Content")
CharArraytype of byte-formatted frame ("Representation")

Constructor & Destructor Documentation

◆ Frame() [1/2]

Frame::Frame ( String * pdu)

Constructor for creating Frame-instance from pdu (Content)

Parameters
pdupointer to String containing the payload of the frame

◆ Frame() [2/2]

Frame::Frame ( CharArray * frame)

Constructor for creating Frame-Object from byte-frame (Representation)

Parameters
framepointer to the char-array-object containing the byte-representation

Member Function Documentation

◆ getServiceId()

virtual uint8_t Frame::getServiceId ( )
pure virtual

Get the ServiceId, the PDU of the Frame belongs to (necessary for Service-multiplexing). The Extraction of the Service-Id from the Frame is protocoll-specific and has to be implemented in the derived class.

Implemented in Frame_modbusRTU.


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