:orphan: .. index:: pair: group; TAPI for remote calls of power switch .. _doxid-group__te__lib__rpc__power__sw: TAPI for remote calls of power switch ===================================== .. toctree:: :hidden: Overview ~~~~~~~~ .. ref-code-block:: cpp :class: doxyrest-overview-code-block // global functions int :ref:`rpc_power_sw`(:ref:`rcf_rpc_server`* rpcs, const char* type, const char* dev, int mask, const char* cmd); .. _details-group__te__lib__rpc__power__sw: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ Global Functions ---------------- .. index:: pair: function; rpc_power_sw .. _doxid-group__te__lib__rpc__power__sw_1ga4aa9973d470b0f1d42cdd41fd4de7e2c: .. ref-code-block:: cpp :class: doxyrest-title-code-block int rpc_power_sw(:ref:`rcf_rpc_server`* rpcs, const char* type, const char* dev, int mask, const char* cmd) Call power switch command on/off/rst for given power switch lines .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - rpcs - RPC server handle * - type - Power switch device type Device type 'parport' is default * - dev - Power switch device name Device name used to contact device. Default value is used if not specified. Device /dev/parport0 is used for parport switch, /dev/ttyUSB0 for tty, /dev/ttyACM0 for digispark. * - mask - Power lines bitmask for type 'parport' or 'tty', position of each nonzero bit in mask denotes number of power line to apply specified command Power socket number for type 'digispark' * - cmd - Power switch command on/off/rst to be applied to power lines specified in bitmask .. rubric:: Returns: 0 on success, otherwise -1