Relay input/output management.
More...
#include <camera_plugin.h>
Relay input/output management.
It is implementation defined within which thread event (nxcip::CameraInputEventHandler::inputPortStateChanged) will be delivered to
◆ getInputPortList()
virtual int nxcip::CameraRelayIOManager::getInputPortList |
( |
char ** |
idList, |
|
|
int * |
idNum |
|
) |
| const |
|
pure virtual |
Returns list of IDs of available relay input ports.
- Parameters
-
[out] | idList | Array of size MAX_RELAY_PORT_COUNT of MAX_ID_LEN - length strings. All strings MUST be NULL-terminated |
[out] | idNum | Size of returned id list |
- Returns
- 0 on success, otherwise - error code
◆ getLastErrorString()
virtual void nxcip::CameraRelayIOManager::getLastErrorString |
( |
char * |
errorString | ) |
const |
|
pure virtual |
Returns text description of last error.
- Parameters
-
[out] | errorString | Buffer of size MAX_TEXT_LEN |
◆ getRelayOutputList()
virtual int nxcip::CameraRelayIOManager::getRelayOutputList |
( |
char ** |
idList, |
|
|
int * |
idNum |
|
) |
| const |
|
pure virtual |
Returns list of IDs of available relay output ports.
- Parameters
-
[out] | idList | Array of size MAX_RELAY_PORT_COUNT of MAX_ID_LEN - length strings. All strings MUST be NULL-terminated |
[out] | idNum | Size of returned id list |
- Returns
- 0 on success, otherwise - error code
◆ registerEventHandler()
Registers handler as event receiver.
Usually, events are delivered (by handler->inputPortStateChanged call) to some plugin internal thread
- Note
- Does not call handler->addRef
◆ setRelayOutputState()
virtual int nxcip::CameraRelayIOManager::setRelayOutputState |
( |
const char * |
outputID, |
|
|
int |
activate, |
|
|
unsigned int |
autoResetTimeoutMS |
|
) |
| |
|
pure virtual |
Change state of relay output port.
- Parameters
-
[in] | outputID | NULL-terminated ID of output port |
[in] | activate | If non-zero, port should be activated (closed circuit), otherwise - deactivated (opened circuit) |
[in] | autoResetTimeoutMS | If non-zero, port MUST return to deactivated state in autoResetTimeoutMS millis |
- Returns
- 0 on success, otherwise - error code
◆ startInputPortMonitoring()
virtual int nxcip::CameraRelayIOManager::startInputPortMonitoring |
( |
| ) |
|
|
pure virtual |
Starts relay input monitoring or increments internal counter, if already started.
- Returns
- 0 on success (or input is already monitored), otherwise - error code
- Note
- Multiple startInputPortMonitoring() require multiple stopInputPortMonitoring() call. E.g., if input is already monitored, increases internal counter
◆ stopInputPortMonitoring()
virtual void nxcip::CameraRelayIOManager::stopInputPortMonitoring |
( |
| ) |
|
|
pure virtual |
Stops input port monitoring if internal monitoring counter has reached zero.
Implementation MUST guarantee:
◆ unregisterEventHandler()
Removes handler from event receiver list.
If handler is not registered, nothing is done Implementation MUST guarantee:
- no handler->inputPortStateChanged method MUST be called after this method have returned
- if handler->inputPortStateChanged is currently running in different thread, this method MUST block until handler->inputPortStateChanged has returned
- Note
- handler->releaseRef() is not called in this method
The documentation for this class was generated from the following file: