#include <si_sha/abrgdev.h>
Public Attributes | |
sc_automationDevice | base_ |
const sc_automationBridgeDevice_vtable * | vtbl_ |
void * | instance_ |
se_bridgeState | state_ |
pthread_mutex_t | mux_ |
pthread_t | svcThread_ |
sc_automationPacketPtrh | xchg_ |
sc_automationDeviceMgr * | pdm_ |
int | fd_ |
int | fdCtlC_ |
int | fdCtlS_ |
This serves as a base class for bridges on the JavaScript side. The base class is able to handle much of the boiler-plate code of being a device. Derived class bridges need to provide virtual functions for the following:
The base will start the needed threads, and when events from the network or requests from JavaScript arrive, it will forward these to the derived class for processing.
Bridges are derived from Device base.
Low-level bridge driver fd
Control fd for Client side
Control fd for Server side
Derived instance address. Passed to derived v-table functions.
pthread_mutex_t sc_automationBridgeDevice::mux_ |
Mutex for thread safety
Reference to Automation Device Manager
Bridge state (started, stopped, etc.)
pthread_t sc_automationBridgeDevice::svcThread_ |
Thread handling events & requests
Derived v-table
sc_automationPacketPtrh sc_automationBridgeDevice::xchg_ |
Exchange point for packets between JS engine and service thread.