OSAPI  0.29
Open System API
com_type_conn_side.h
1 // *****************************************************************************************
2 //
3 // File description:
4 //
5 // Author: Joao Costa
6 // Purpose: Connection side type declarations
7 //
8 // *****************************************************************************************
9 
10 #ifndef OSAPI_COM_TYPE_CONN_SIDE_H_
11 #define OSAPI_COM_TYPE_CONN_SIDE_H_
12 
13 // *****************************************************************************************
14 //
15 // Section: Import headers
16 //
17 // *****************************************************************************************
18 
19 // Standard C headers
20 
21 
22 // Import OSAPI headers
23 #include "general/general_protocol.h"
24 #include "common/common_types.h"
25 
26 // Import own module headers
27 #include "com/type/com_type_endpoint.h"
28 
29 
30 
31 // *****************************************************************************************
32 //
33 // Section: Type definitions
34 //
35 // *****************************************************************************************
36 
39 {
41 };
42 
45 {
47 };
48 
49 
52 {
54  union u_side
55  {
57  struct conn_side_mp_S mp;
58  /*
59  struct s_conn_side_broadcast;
60  struct s_conn_side_unicast;
61  */
62  } side;
63 };
64 
67 
68 
69 
70 
71 #endif /* OSAPI_COM_TYPE_CONN_SIDE_H_ */
osapi_status_S
Definition of opaque status type.
Definition: status_types.h:56
connection_side_S::u_side::p2p
struct conn_side_p2p_S p2p
Point to Point connection side.
Definition: com_type_conn_side.h:56
conn_side_p2p_S::ep
t_endpoint ep
The endpoint information for Point to Point connections.
Definition: com_type_conn_side.h:40
status_iset
#define status_iset(m, f, e, r)
Set status type with OSAPI library information.
Definition: status_defs.h:61
com_semaphore_getValue
t_status com_semaphore_getValue(int semid, int *value)
Obtains the semaphore value that corresponds to the given ID.
status_eset
#define status_eset(m, f, e, r)
Set status type with C library information.
Definition: status_defs.h:64
osapi_connection_endpoint_S
Define a generic connection endpoint type.
Definition: com_type_endpoint.h:33
com_semaphore_supported
t_status com_semaphore_supported(void)
Are semaphores supported in this platform ?
com_semaphore_lock
t_status com_semaphore_lock(int semid, bool wait)
Locks a given semaphore.
connection_side_S::side
union connection_side_S::u_side side
The connection side information.
conn_side_mp_S
Placeholder structure for now (dummy)
Definition: com_type_conn_side.h:44
RETURN_STATUS_SUCCESS
#define RETURN_STATUS_SUCCESS
Short notation to set a status type with a default value of success.
Definition: status_defs.h:55
com_semaphore_destroy
t_status com_semaphore_destroy(int semid)
Destroys the semaphore identified by "semid".
conn_side_mp_S::ep
t_endpoint ep[2]
The endpoint information for MultiPoint connections.
Definition: com_type_conn_side.h:46
com_semaphore_open
t_status com_semaphore_open(key_t key, int *semid)
Returns the semaphore ID for the provided semaphore key.
com_semaphore_unlock
t_status com_semaphore_unlock(int semid, bool wait)
Unlocks a given semaphore.
status_reset
#define status_reset(x)
Resets the status structure (to success)
Definition: status_macros.h:37
connection_side_S::u_side
The union of all possible connection sides.
Definition: com_type_conn_side.h:54
connection_side_S
Define a connection side type.
Definition: com_type_conn_side.h:51
com_semaphore_create
t_status com_semaphore_create(key_t key, int sem_value, int sem_options, int *semid)
Create an IPC semaphore.
conn_side_p2p_S
Point to Point connection topology.
Definition: com_type_conn_side.h:38
connection_side_S::u_side::mp
struct conn_side_mp_S mp
Multi Point connection side.
Definition: com_type_conn_side.h:57