Neonode zForce(TM) SDK
HidPipeTransport.h
Go to the documentation of this file.
1 
10 #ifndef TRANSPORT_HIDPIPETRANSPORT_HIDPIPETRANSPORT_H
11 #define TRANSPORT_HIDPIPETRANSPORT_HIDPIPETRANSPORT_H 1
12 
13 #ifndef ZFORCECOMMON_H
14  #error Please include "zForceCommon.h" before this file.
15 #endif // ZFORCECOMMON_H
16 
20 typedef struct HidPipeTransport HidPipeTransport;
27 {
37 
46 
55 
66  char ConnectionString [TRANSPORTPROTOCOL_MaxOptionParameterLength + 1];
67 
75  volatile bool Terminate;
76 
85 
93  bool IsOpen;
94 
102  bool Opening;
103 
112 
121 
130 
139 
162  bool ( * Open) (Transport * self);
163 
180  bool ( * Close) (Transport * self);
181 
197  DataFrame * ( * Read) (Transport * self);
198 
216  bool ( * Write) (Transport * self, DataFrame * payload);
217 
229  uint64_t ( * GetTimeOutValue) (Transport * self);
230 
249  bool ( * EnqueueDataFrame) (Transport * self, DataFrame * dataFrame);
250 
260  void ( * Destructor ) (Transport * self);
261 
271  void ( * TransportLost) (Transport * self);
272 
281 
282  void * Private;
283 };
284 
285 #ifdef __cplusplus
286 extern "C"
287 {
288 #endif // __cplusplus
289 
305 
306 #ifdef __cplusplus
307 }
308 #endif // __cplusplus
309 
310 #endif // TRANSPORT_HIDPIPETRANSPORT_HIDPIPETRANSPORT_H
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
ReadWriteThreadStatus
Enum describing the current status of a Read or Write thread.
Definition: Transport.h:21
The main Connection struct.
Definition: Connection.h:66
Struct containing the DataFrame information.
Definition: DataFrame.h:25
Struct containing the HidPipeTransport information.
Definition: HidPipeTransport.h:27
volatile ReadWriteThreadStatus ReadThreadStatus
Thread is active.
Definition: HidPipeTransport.h:138
bool(* Close)(Transport *self)
Close the generic Transport.
Definition: HidPipeTransport.h:180
uint64_t(* GetTimeOutValue)(Transport *self)
Function pointer to Transport's GetTimeOutValue.
Definition: HidPipeTransport.h:229
zForceThread * WriteThread
Write Thread pointer.
Definition: HidPipeTransport.h:111
volatile bool Terminate
A flag indicating if the Transport Read and Write threads should terminate (true) or not (false).
Definition: HidPipeTransport.h:75
zForce * zForce
A pointer to the global zForce instance.
Definition: HidPipeTransport.h:54
Connection * Connection
Each Transport is linked to one Connection.
Definition: HidPipeTransport.h:45
zForceThread * ReadThread
Read Thread pointer.
Definition: HidPipeTransport.h:120
void(* Destructor)(Transport *self)
Destructor frees all the resources that have been allocated.
Definition: HidPipeTransport.h:260
volatile ReadWriteThreadStatus WriteThreadStatus
Thread is active.
Definition: HidPipeTransport.h:129
Queue * WriteQueue
A pointer to the Write queue used by EnqueueDataFrame.
Definition: HidPipeTransport.h:84
bool Opening
Transport is in Opening phase.
Definition: HidPipeTransport.h:102
void(* TransportLost)(Transport *self)
Signals the transport that it has been lost and acts accordingly.
Definition: HidPipeTransport.h:271
void * Private
Private members of HidPipeTransport.
Definition: HidPipeTransport.h:282
Transport * Base
Base pointer to the immediate base Transport class.
Definition: HidPipeTransport.h:36
bool IsOpen
A flag indicating if the Transport is open (true) or not (false).
Definition: HidPipeTransport.h:93
bool(* EnqueueDataFrame)(Transport *self, DataFrame *dataFrame)
Enqueue given dataframe.
Definition: HidPipeTransport.h:249
bool(* Open)(Transport *self)
Open the generic Transport.
Definition: HidPipeTransport.h:162
char ConnectionString[TRANSPORTPROTOCOL_MaxOptionParameterLength+1]
Connection string.
Definition: HidPipeTransport.h:66
bool(* Write)(Transport *self, DataFrame *payload)
Function pointer to Transport's Write.
Definition: HidPipeTransport.h:216
bool StopCommunication
Boolean value that indicates that there is no longer any communication. Internal use only.
Definition: HidPipeTransport.h:280
The Queue struct.
Definition: Queue.h:25
Transport struct. This structure represents the base class of all Transport definitions.
Definition: Transport.h:43
Main struct.
Definition: zForce.h:29