12 #include <gxPL/defs.h> 13 #include <gxPL/message.h> 14 #include <gxPL/util.h> 15 #include <gxPL/device.h> 18 #include <gxPL/bridge.h> 107 int gxPLAppPoll (gxPLApplication * app,
int timeout_ms);
163 const gxPLMessage * message,
const gxPLId * my_id);
183 gxPLDevice *
gxPLAppAddDevice (gxPLApplication * app,
const char * vendor_id,
184 const char * device_id,
const char * instance_id);
232 const char * vendor_id,
const char * device_id,
233 const char * filename);
439 int gxPLIoCtl (gxPLApplication * app,
int req, ...);
unsigned long gxPLVersionSha1(void)
SHA1 signature of the current version.
int gxPLAppClose(gxPLApplication *app)
Close a gxPLApplication object and release all ressources.
gxPLSetting * gxPLAppSetting(gxPLApplication *app)
Returns application setting.
const xVector * gxPLIoLocalAddrList(const gxPLApplication *app)
Local network address list as a vector of strings.
gxPLDevice * gxPLAppAddDevice(gxPLApplication *app, const char *vendor_id, const char *device_id, const char *instance_id)
Adds a new device to an application.
int gxPLAppSendMessage(gxPLApplication *app, const gxPLMessage *message, const gxPLIoAddr *target)
Send a targeted xPL message.
Describe a source or destination xPL identifier.
int gxPLGenerateUniqueId(const gxPLApplication *app, char *id, int len)
Generates a fairly unique identifier.
gxPLDevice * gxPLAppAddConfigurableDevice(gxPLApplication *app, const char *vendor_id, const char *device_id, const char *filename)
Adds a new configurable device.
gxPLSetting * gxPLSettingFromCommandArgs(int argc, char *argv[], gxPLConnectType type)
Returns a new gxPLApplication setting from command line parameters.
int gxPLAppPoll(gxPLApplication *app, int timeout_ms)
Polling event of an application.
gxPLConnectType
xPL Connection mode
Describe a gxPLApplication configuration.
void(* gxPLMessageListener)(gxPLApplication *app, gxPLMessage *, void *)
Function that will be called each valid message reception.
int gxPLVersionPatch(void)
Patch number of the current version.
int gxPLAppIsHubEchoMessage(const gxPLApplication *app, const gxPLMessage *message, const gxPLId *my_id)
Check if a message is an echo hub.
int gxPLAppDisableAllDevices(gxPLApplication *app)
Stop all devices.
const char * gxPLIoBcastAddrGet(const gxPLApplication *app)
Broadcast network address as a string.
Describe a network address.
int gxPLAppDeviceIndex(gxPLApplication *app, const gxPLDevice *device)
Return index for a given device.
gxPLSetting * gxPLSettingNew(const char *iface, const char *iolayer, gxPLConnectType type)
Returns a new gxPLApplication setting from parameters.
gxPLConnectType gxPLAppConnectionType(const gxPLApplication *app)
Connection type.
const char * gxPLIoLayerGet(const gxPLApplication *app)
Name of the underlying layer of the network.
xVector * gxPLIoLayerList(void)
Returns a list of io layers available on the system.
const char * gxPLIoInterfaceGet(const gxPLApplication *app)
Name of the network interface on the system.
int gxPLVersionMajor(void)
Major number of the current version.
const gxPLIoAddr * gxPLIoInfoGet(const gxPLApplication *app)
Local Network informations.
gxPLApplication * gxPLAppOpen(gxPLSetting *setting)
Opens a new gxPLApplication object.
int gxPLAppDeviceCount(gxPLApplication *app)
Return number of devices.
int gxPLAppBroadcastMessage(gxPLApplication *app, const gxPLMessage *message)
Broadcast a message.
const char * gxPLVersion(void)
Current version as a static string buffer.
int gxPLMessageListenerRemove(gxPLApplication *app, gxPLMessageListener listener)
Remove a message listener.
int gxPLMessageListenerAdd(gxPLApplication *app, gxPLMessageListener listener, void *udata)
Add a message listener.
int gxPLAppRemoveDevice(gxPLApplication *app, gxPLDevice *device)
Removes a device.
const char * gxPLIoLocalAddrGet(const gxPLApplication *app)
Local network address as a string.
gxPLDevice * gxPLAppDeviceAt(gxPLApplication *app, int index)
Return a device at a given index.
int gxPLVersionMinor(void)
Minor number of the current version.