LTPS C++ API
Public Member Functions | List of all members
CWg Class Reference

Wiegand Tibbit#08 I/O class. More...

#include <CWg.h>

Public Member Functions

int init (const char *_sock)
 Open Wiegand device on socket _sock. More...
 
char * cur_sock (void)
 Get current socket name.
 
int mode_get (void)
 Get/Set current Tibbit#08 mode. More...
 
int mode_set (uint8_t _mode)
 
int out0_get (void)
 Get/Set value of open collector pin. More...
 
int out0_set (uint8_t _val)
 
int conr_get (void)
 Get/Set value of 'clear on read' flag. More...
 
int conr_set (uint8_t _val)
 
int R (wg_data_t &_buf)
 Read Wiegand buffer After this function call Wiegand device buffer gets empty This call is non-blocking, check return code to see if data exist. More...
 

Detailed Description

Wiegand Tibbit#08 I/O class.

Examples:
twg.cpp.

Member Function Documentation

int CWg::conr_get ( void  )

Get/Set value of 'clear on read' flag.

Return values
0OK
<0failed (check errno value)
int CWg::conr_set ( uint8_t  _val)
Return values
0OK
<0failed (check errno value)
int CWg::init ( const char *  _sock)

Open Wiegand device on socket _sock.

Return values
1OK
0Not opened
<0Errno
Examples:
twg.cpp.
int CWg::mode_get ( void  )

Get/Set current Tibbit#08 mode.

Return values
==1 mode is Wiegand
==0 mode is Clock/Data
<0failed (check errno value)
Examples:
twg.cpp.
int CWg::mode_set ( uint8_t  _mode)

_mode == 1 mode is Wiegand _mode == 0 mode is Clock/Data

Return values
<0failed (check errno value)
int CWg::out0_get ( void  )

Get/Set value of open collector pin.

Return values
0OK
<0failed (check errno value)
int CWg::out0_set ( uint8_t  _val)
Return values
0OK
<0failed (check errno value)
Examples:
twg.cpp.
int CWg::R ( wg_data_t _buf)

Read Wiegand buffer After this function call Wiegand device buffer gets empty This call is non-blocking, check return code to see if data exist.

Return values
>0OK
<=0Data is not ready
Examples:
twg.cpp.

The documentation for this class was generated from the following file: