10 #ifndef TRANSPORT_TRANSPORT_H
11 #define TRANSPORT_TRANSPORT_H 1
13 #ifndef ZFORCECOMMON_H
14 #error Please include "zForceCommon.h" before this file.
341 #ifdef USE_SERIALTRANSPORT
345 #ifdef USE_HIDPIPETRANSPORT
DLLINTERNAL bool HidPipeTransport_AddHidPipeTransportEntry(void)
Internal call to add a HidPipeTransport to the list of available transports.
void zForceThread
Typecast to underlying (system) type.
Definition: OsAbstractionLayer.h:20
DLLINTERNAL bool SerialTransport_AddSerialTransportEntry(void)
Internal call to add a SerialTransport to the list of available transports.
struct TransportEntry TransportEntry
Definition: Transport.h:33
DLLEXTERNAL bool Transport_AddTransport(TransportEntry *transportEntry)
Add a new Transport to the list of those available.
DLLEXTERNAL Transport * Transport_GetInstance(Connection *connection, char *connectionString, char *dataFrameType)
Transport factory function.
ReadWriteThreadStatus
Enum describing the current status of a Read or Write thread.
Definition: Transport.h:21
@ ThreadIsInitializing
Thread is Initializing.
Definition: Transport.h:23
@ ThreadIsRunning
Thread is Running.
Definition: Transport.h:24
@ ThreadIsNotRunning
Thread is not running.
Definition: Transport.h:22
@ ThreadIsTerminating
Thread is Terminating.
Definition: Transport.h:25
DLLINTERNAL bool Transport_Initialize(void)
Initialize the Transport module.
DLLINTERNAL void Transport_Uninitialize(void)
Uninitialize the Transport module.
The main Connection struct.
Definition: Connection.h:66
Struct containing the DataFrame information.
Definition: DataFrame.h:25
The Queue struct.
Definition: Queue.h:25
Transport struct. This structure represents the base class of all Transport definitions.
Definition: Transport.h:43
zForce * zForce
A pointer to the global zForce instance.
Definition: Transport.h:64
void(* TransportLost)(Transport *self)
Signals the transport that it has been lost and acts accordingly.
Definition: Transport.h:248
volatile ReadWriteThreadStatus ReadThreadStatus
Thread is active.
Definition: Transport.h:130
Connection * Connection
Each Transport is linked to one Connection.
Definition: Transport.h:57
zForceThread * WriteThread
Write Thread pointer.
Definition: Transport.h:109
char ConnectionString[TRANSPORTPROTOCOL_MaxOptionParameterLength+1]
Connection string.
Definition: Transport.h:74
Transport * Base
Base pointer to the immediate base Transport class.
Definition: Transport.h:50
bool(* EnqueueDataFrame)(Transport *self, DataFrame *dataFrame)
Enqueue given dataframe.
Definition: Transport.h:230
uint64_t(* GetTimeOutValue)(Transport *self)
Function pointer to Transport's GetTimeOutValue.
Definition: Transport.h:212
bool(* Close)(Transport *self)
Close the generic Transport.
Definition: Transport.h:168
volatile bool Terminate
A flag indicating if the Transport Read and Write threads should terminate (true) or not (false).
Definition: Transport.h:81
bool(* Write)(Transport *self, DataFrame *payload)
Function pointer to Transport's Write.
Definition: Transport.h:201
zForceThread * ReadThread
Read Thread pointer.
Definition: Transport.h:116
bool(* Open)(Transport *self)
Open the generic Transport.
Definition: Transport.h:152
bool IsOpen
A flag indicating if the Transport is open (true) or not (false).
Definition: Transport.h:95
volatile ReadWriteThreadStatus WriteThreadStatus
Thread is active.
Definition: Transport.h:123
void(* Destructor)(Transport *self)
Destructor frees all the resources that have been allocated.
Definition: Transport.h:239
bool StopCommunication
Boolean value that indicates that there is no longer any communication. Internal use only.
Definition: Transport.h:255
Queue * WriteQueue
A pointer to the Write queue used by EnqueueDataFrame.
Definition: Transport.h:88
bool Opening
Transport is in Opening phase.
Definition: Transport.h:102
Main struct.
Definition: zForce.h:29