SCOM Serial Communication Protocol  0.5.2
Data Fields
SCOMDataLinkDesc Struct Reference

SCOM Data Link descriptor. More...

#include <scom.h>

Data Fields

IODevice iodevice
 
SCOMClockSource clockSource
 IODevice object implementing the hardware interface. More...
 
uint32_t timeout
 Clock source provider function. More...
 
SCOMIdentity id
 Packet timeout. More...
 
uint8_t serviceCount
 SCOM device identity. More...
 
SCOMConnectionState connectionState
 Number of services supported by this instance of SCOM. More...
 
SCOMReceiverState rxState
 Overall state of the connection. More...
 
bool monitorMode
 State of the SCOM receiver. More...
 
SCOMFrameBufferframeBuffer
 monitor mode indication (when true - monitor mode is on, the device does not transmit anything, just listens) More...
 
SCOMACKState rxAck
 frame buffer - holds the queues used for sending and receiving SCOM frames More...
 
SCOMACKState txAck
 Descriptor holding the received ACK. More...
 
SCOMFrameQueueItemframeBeingReceived
 Descriptor holding the ACK to transmit. More...
 
SCOMFrameQueueItemframeBeingTransmitted
 Frame buffer item that is being used as a place for a currently receiving frame. More...
 
uint8_t retransmissionCounter
 Frame buffer item that is currently being sent. More...
 
uint8_t lastFrameNumber
 Counter holding the number of retransmission for a frame that is being currently sent. More...
 
uint16_t lastFrameCrc
 Number of the last received frame. More...
 
uint32_t sendTime
 CRC of the last received frame. More...
 
uint32_t receptionTime
 Transmitted frame send time. More...
 
uint32_t txCounter
 Received frame time. More...
 
uint32_t multiCounter
 Counter increased after every frame scheduled to send. More...
 
uint32_t connectivityCheckPeriod
 Counter increased after every first frame of a multi-frame is scheduled to send. More...
 
uint32_t lastConnectivityCheckTime
 Time period for checking connection status. More...
 
uint32_t connectivityCheckIncommingCounter
 Time at which last connectivity check was performed. More...
 
uint32_t connectivityCheckOutgoingCounter
 Incomming PING counter. More...
 
bool(* receptionHandler )(struct SCOMDataLinkDesc *scom, SCOMFrame *frame)
 Outgoing PING counter. More...
 
void(* ackHandler )(struct SCOMDataLinkDesc *scom, uint8_t frame_type)
 Frame reception handler function. More...
 
SCOMStatistics stats
 ACK reception handler function (used only in monitor mode) More...
 
OSMutex accessGuard
 SCOM statistics. More...
 
OSTask procTask
 mutex guarding access to this object More...
 

Detailed Description

SCOM Data Link descriptor.

Definition at line 134 of file scom.h.

Field Documentation

OSMutex SCOMDataLinkDesc::accessGuard
void(* SCOMDataLinkDesc::ackHandler)(struct SCOMDataLinkDesc *scom, uint8_t frame_type)

Frame reception handler function.

Definition at line 163 of file scom.h.

Referenced by SCOM_SetAckReceptionHandlerFunc().

SCOMClockSource SCOMDataLinkDesc::clockSource

IODevice object implementing the hardware interface.

Definition at line 136 of file scom.h.

Referenced by SCOM_Init(), SCOM_Proc(), and SCOM_WaitForDevice().

SCOMConnectionState SCOMDataLinkDesc::connectionState

Number of services supported by this instance of SCOM.

Definition at line 140 of file scom.h.

Referenced by SCOM_Deinit(), SCOM_GetConnectionState(), SCOM_Init(), and SCOM_Proc().

uint32_t SCOMDataLinkDesc::connectivityCheckIncommingCounter

Time at which last connectivity check was performed.

Definition at line 160 of file scom.h.

Referenced by SCOM_Init().

uint32_t SCOMDataLinkDesc::connectivityCheckOutgoingCounter

Incomming PING counter.

Definition at line 161 of file scom.h.

Referenced by SCOM_Init().

uint32_t SCOMDataLinkDesc::connectivityCheckPeriod

Counter increased after every first frame of a multi-frame is scheduled to send.

Definition at line 158 of file scom.h.

Referenced by SCOM_DisableConnectivityCheck(), SCOM_EnableConnectivityCheck(), and SCOM_Init().

SCOMFrameQueueItem* SCOMDataLinkDesc::frameBeingReceived

Descriptor holding the ACK to transmit.

Definition at line 146 of file scom.h.

Referenced by SCOM_Proc().

SCOMFrameQueueItem* SCOMDataLinkDesc::frameBeingTransmitted

Frame buffer item that is being used as a place for a currently receiving frame.

Definition at line 147 of file scom.h.

Referenced by SCOM_Init(), SCOM_IsBusy(), and SCOM_Proc().

SCOMFrameBuffer* SCOMDataLinkDesc::frameBuffer
SCOMIdentity SCOMDataLinkDesc::id

Packet timeout.

Definition at line 138 of file scom.h.

Referenced by SCOM_Init().

IODevice SCOMDataLinkDesc::iodevice

Definition at line 135 of file scom.h.

Referenced by SCOM_GetIODevice(), SCOM_Init(), and SCOM_Proc().

uint32_t SCOMDataLinkDesc::lastConnectivityCheckTime

Time period for checking connection status.

Definition at line 159 of file scom.h.

Referenced by SCOM_Init(), and SCOM_Proc().

uint16_t SCOMDataLinkDesc::lastFrameCrc

Number of the last received frame.

Definition at line 150 of file scom.h.

uint8_t SCOMDataLinkDesc::lastFrameNumber

Counter holding the number of retransmission for a frame that is being currently sent.

Definition at line 149 of file scom.h.

Referenced by SCOM_Init().

bool SCOMDataLinkDesc::monitorMode

State of the SCOM receiver.

Definition at line 142 of file scom.h.

Referenced by SCOM_InitAsMonitor().

uint32_t SCOMDataLinkDesc::multiCounter

Counter increased after every frame scheduled to send.

Definition at line 157 of file scom.h.

Referenced by SCOM_Init(), SCOM_SendAllocatedMultiFrame(), SCOM_SendMultiFrame(), and SCOM_SendServiceMultiFrame().

OSTask SCOMDataLinkDesc::procTask

mutex guarding access to this object

Definition at line 189 of file scom.h.

Referenced by SCOM_RunProcessingThread(), and SCOM_StopProcessingThread().

bool(* SCOMDataLinkDesc::receptionHandler)(struct SCOMDataLinkDesc *scom, SCOMFrame *frame)

Outgoing PING counter.

Definition at line 162 of file scom.h.

Referenced by SCOM_SetFrameReceptionHandlerFunc().

uint32_t SCOMDataLinkDesc::receptionTime

Transmitted frame send time.

Definition at line 152 of file scom.h.

Referenced by SCOM_Proc().

uint8_t SCOMDataLinkDesc::retransmissionCounter

Frame buffer item that is currently being sent.

Definition at line 148 of file scom.h.

SCOMACKState SCOMDataLinkDesc::rxAck

frame buffer - holds the queues used for sending and receiving SCOM frames

Definition at line 144 of file scom.h.

Referenced by SCOM_Init(), and SCOM_Proc().

SCOMReceiverState SCOMDataLinkDesc::rxState

Overall state of the connection.

Definition at line 141 of file scom.h.

Referenced by SCOM_Init(), and SCOM_Proc().

uint32_t SCOMDataLinkDesc::sendTime

CRC of the last received frame.

Definition at line 151 of file scom.h.

Referenced by SCOM_Proc().

uint8_t SCOMDataLinkDesc::serviceCount

SCOM device identity.

Definition at line 139 of file scom.h.

Referenced by SCOM_Init().

SCOMStatistics SCOMDataLinkDesc::stats

ACK reception handler function (used only in monitor mode)

Definition at line 164 of file scom.h.

Referenced by SCOM_GetStatistics(), SCOM_Init(), SCOM_Proc(), and SCOM_ResetStatistics().

uint32_t SCOMDataLinkDesc::timeout

Clock source provider function.

Definition at line 137 of file scom.h.

Referenced by SCOM_Init(), and SCOM_Proc().

SCOMACKState SCOMDataLinkDesc::txAck

Descriptor holding the received ACK.

Definition at line 145 of file scom.h.

Referenced by SCOM_Proc().

uint32_t SCOMDataLinkDesc::txCounter

Received frame time.

Definition at line 156 of file scom.h.

Referenced by SCOM_Init().


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