Engage Engine API  1.244.9084
Loading...
Searching...
No Matches
EngageNetworkDevice.h
Go to the documentation of this file.
1//
2// Copyright (c) 2019 Rally Tactical Systems, Inc.
3// All rights reserved.
4//
10#ifndef EngageNetworkDevice_h
11#define EngageNetworkDevice_h
12
13
14#ifdef __cplusplus
15extern "C"
16{
17#endif
18
19#if !defined(ENGAGE_API)
20 #if defined(WIN32)
21 #ifdef ENGAGE_EXPORTS
22 // Windows needs dllexport to produce an import lib without a .DEF file
23 #define ENGAGE_API __declspec(dllexport) extern
24 #else
25 #define ENGAGE_API extern
26 #endif
27 #else
28 #define ENGAGE_API __attribute__ ((visibility ("default")))
29 #endif
30#endif
31
49
56
63
70
77
84
91
98
123typedef int (*PFN_ENGAGE_NETWORK_DEVICE_CTL)(int16_t deviceId,
125 const char *jsonMetaData,
126 uintptr_t p1,
127 uintptr_t p2,
128 uintptr_t p3,
129 uintptr_t p4,
130 uintptr_t p5);
131
142ENGAGE_API int16_t engageNetworkDeviceRegister(const char *jsonConfiguration, PFN_ENGAGE_NETWORK_DEVICE_CTL pfnCtl);
143
153ENGAGE_API int16_t engageNetworkDeviceUnregister(int16_t deviceId);
154
155#ifdef __cplusplus
156}
157#endif
158#endif // EngageNetworkDevice_h
static const int ENGAGE_NETWORK_DEVICE_RESULT_OK
Everything is fine.
static const int ENGAGE_NETWORK_DEVICE_INVALID_CONFIGURATION
Unable to register device due to invalid configuration.
ENGAGE_API int16_t engageNetworkDeviceUnregister(int16_t deviceId)
[SYNC] Unregisters a network device
EngageNetworkDeviceCtlOp_t
Network Device Control Operation enum.
@ enetRecv
Read a buffer.
@ enetStart
Start operation.
@ enetStop
Stop operation.
@ enetSend
Send a buffer.
static const int ENGAGE_NETWORK_DEVICE_INVALID_OPERATION
An invalid operation has been attempted.
int(* PFN_ENGAGE_NETWORK_DEVICE_CTL)(int16_t deviceId, EngageNetworkDeviceCtlOp_t op, const char *jsonMetaData, uintptr_t p1, uintptr_t p2, uintptr_t p3, uintptr_t p4, uintptr_t p5)
Network Device Control instance control pointer.
static const int ENGAGE_NETWORK_DEVICE_INVALID_DEVICE_ID
Invalid deviceId.
static const int ENGAGE_NETWORK_DEVICE_INVALID_INSTANCE_ID
Invalid instanceId.
ENGAGE_API int16_t engageNetworkDeviceRegister(const char *jsonConfiguration, PFN_ENGAGE_NETWORK_DEVICE_CTL pfnCtl)
[SYNC] Registers a network device with the Engine
static const int ENGAGE_NETWORK_DEVICE_INVALID_COMBINED_DEVICE_ID_AND_INSTANCE_ID
Invalid deviceId and instanceId.
static const int ENGAGE_NETWORK_DEVICE_GENERAL_ERROR
A general error occurred.