#include "JsonSDK.h"
#include "JsonMng.h"
#include "RfidMonitor.h"
#include "OdvMonitor.h"
#include "PrinterMonitor.h"
#include "SettingsReadWrite.h"
#include "JsonConfig.h"
Functions | |
void | MessengerGet (void *ptrComm, COMM_TYP commTyp, int maxInputMsgCapacity, bool usingDataPort) |
Creates a channel for sending/receiving management messages with a maximum capacity specified. | |
void | MessengerRelease () |
Release the Messenger resource. | |
void | MessengerSendMsg (char *strCommand, char *strContent) |
Send a management command and data/content to printer. | |
void | MessengerReadNextMsg (const char **strNextMsg) |
Read next message that may have been received asynchronously from printer. | |
void | MessengerSendMsgAndWaitForResponse (char *strCommand, char *strContent, int maxWaitTimeSecs, const char **strResponse) |
Send a management command and data/content to printer and wait for response maxWaitTimeSecs time. | |
int | MessengerUnreadMsgCount () |
Get the count for the unread messages. | |
void | RfidMonitorConnection (char *lpAddress) |
Use NET I/F to connect the printer for RFID monitor function. | |
void | OdvMonitorConnection (char *lpAddress) |
Use NET I/F to connect the printer for ODV monitor function. | |
void | PrinterMonitorConnection (char *lpAddress, INFO_TYP InfoTyp) |
Use NET I/F to connect the printer for the status of printer monitor. | |
void | GetPrinterInfo (stPrinterInfo *pPrtInfo, INFO_TYP InfoTyp) |
Get the information for printer function. | |
bool | GetRfidReportListening () |
Get the flag of RFID report listening. | |
void | SetRfidReportListening (bool value) |
Set the flag of RFID report listening. | |
bool | GetOdvReportListening () |
Get the flag of ODV report listening. | |
void | SetOdvReportListening (bool value) |
Set the flag of ODV report listening. | |
void | RfidMonitorDispose () |
Release RFID monitor resource. | |
void | OdvMonitorDispose () |
Release ODV monitor resource. | |
void | PrinterMonitorDispose (INFO_TYP InfoTyp) |
Release printer monitor resource. | |
void | SetRfidReportCallback (void callback(const RfidReport &report)) |
Set a callback function to get RFID report. | |
void | SetOdvReportCallback (void callback(const OdvReport &report)) |
Set a callback function to get ODV report. | |
void | SetEngineStatusListening (bool value) |
Set the flag of printer report listening for engine status. | |
void | SetDisplayStatusListening (bool value) |
Set the flag of printer report listening for display status. | |
void | SetAlertStatusListening (bool value) |
Set the flag of printer report listening for alert status. | |
bool | GetEngineStatusListening () |
Get the flag of engine status listening. | |
bool | GetDisplayStatusListening () |
Get the flag of display status listening. | |
bool | GetAlertStatusListening () |
Get the flag of alert status listening. | |
void | SetEngineStatusCallback (void callback(const std::string &engineState)) |
Set a callback function to get engine status. | |
void | SetDisplayStatusCallback (void callback(const std::vector< std::string > &newDisplayText)) |
Set a callback function to get display status. | |
void | SetAlertStatusCallback (void callback(const std::vector< std::string > &alert)) |
Set a callback function to get alert status. | |
char * | GetPrinterAllValues (void *ptrComm, COMM_TYP commTyp, bool usingDataPort) |
Get all settings of printer. | |
char * | GetPrinterValue (void *ptrComm, COMM_TYP commTyp, bool usingDataPort, const char *key) |
Get a single setting of printer. | |
char * | GetPrinterValues (void *ptrComm, COMM_TYP commTyp, bool usingDataPort, const std::vector< std::string > &keys) |
Get multiple settings of printer. | |
bool | SetPrinterValue (void *ptrComm, COMM_TYP commTyp, bool usingDataPort, const char *key, const char *value) |
Set a single setting of printer. | |
bool | SetPrinterValues (void *ptrComm, COMM_TYP commTyp, bool usingDataPort, std::map< std::string, std::string > *keysToSet) |
Set multiple settings of printer. | |
char * | GetPrinterProperties (void *ptrComm, COMM_TYP commTyp, bool usingDataPort, const char *key) |
Get a single property of printer. | |
char * | GetPrinterPropertiesEx (void *ptrComm, COMM_TYP commTyp, bool usingDataPort, const char *keys[], size_t count) |
Get multiple properties of printer. | |
char * | GetPrinterAllProperties (void *ptrComm, COMM_TYP commTyp, bool usingDataPort) |
Get all properties of printer. | |
void | FreeString (char *str) |
Release string resource. | |
char * | GetPrinterConfig (void *ptrComm, COMM_TYP commTyp, bool usingDataPort, int CfgNumber) |
Get a single configuration of printer. | |
bool | SetPrinterConfig (void *ptrComm, COMM_TYP commTyp, bool usingDataPort, char *pConfig) |
Set a single configuration of printer. | |
char * | GetPrinterAllConfig (void *ptrComm, COMM_TYP commTyp, bool usingDataPort) |
Get all configurations of printer. | |
Variables | |
static JsonMessenger | gJsonMessenger |
static RfidMonitor | gRfidMonitor |
static RfidReport | gRfidReport |
static OdvMonitor | gOdvMonitor |
static PrinterMonitor | gPrinterMonitor_Rfid |
static PrinterMonitor | gPrinterMonitor_Odv |
static PrinterMonitor | gPrinterMonitor |
static std::string | AllMsg |
void FreeString | ( | char * | str | ) |
Release string resource.
[in] | str | : a string resource |
bool GetAlertStatusListening | ( | ) |
Get the flag of alert status listening.
bool GetDisplayStatusListening | ( | ) |
Get the flag of display status listening.
bool GetEngineStatusListening | ( | ) |
Get the flag of engine status listening.
bool GetOdvReportListening | ( | ) |
Get the flag of ODV report listening.
char * GetPrinterAllConfig | ( | void * | ptrComm, |
COMM_TYP | commTyp, | ||
bool | usingDataPort ) |
Get all configurations of printer.
[in] | commPtr | : a pointer to storage communicating I/F |
[in] | commTyp | : set the type of interface |
[in] | usingDataPort | : a flag to use data port |
char * GetPrinterAllProperties | ( | void * | ptrComm, |
COMM_TYP | commTyp, | ||
bool | usingDataPort ) |
Get all properties of printer.
[in] | commPtr | : a pointer to storage communicating I/F |
[in] | commTyp | : set the type of interface |
[in] | usingDataPort | : a flag to use data port |
char * GetPrinterAllValues | ( | void * | ptrComm, |
COMM_TYP | commTyp, | ||
bool | usingDataPort ) |
Get all settings of printer.
[in] | commPtr | : a pointer to storage communicating I/F |
[in] | commTyp | : set the type of interface |
[in] | usingDataPort | : a flag to use data port |
char * GetPrinterConfig | ( | void * | ptrComm, |
COMM_TYP | commTyp, | ||
bool | usingDataPort, | ||
int | CfgNumber ) |
Get a single configuration of printer.
[in] | commPtr | : a pointer to storage communicating I/F |
[in] | commTyp | : set the type of interface |
[in] | usingDataPort | : a flag to use data port |
[in] | CfgNumber | : an index of the configuration, the range is 0 ~ 8 |
void GetPrinterInfo | ( | stPrinterInfo * | pPrtInfo, |
INFO_TYP | InfoTyp ) |
Get the information for printer function.
[out] | pPrtInfo | : a struct to storage the printer information |
[in] | InfoTyp | : Set the type for RFID or ODV information |
char * GetPrinterProperties | ( | void * | ptrComm, |
COMM_TYP | commTyp, | ||
bool | usingDataPort, | ||
const char * | key ) |
Get a single property of printer.
[in] | commPtr | : a pointer to storage communicating I/F |
[in] | commTyp | : set the type of interface |
[in] | usingDataPort | : a flag to use data port |
[in] | key | a key value for properties of printer |
char * GetPrinterPropertiesEx | ( | void * | ptrComm, |
COMM_TYP | commTyp, | ||
bool | usingDataPort, | ||
const char * | keys[], | ||
size_t | count ) |
Get multiple properties of printer.
[in] | commPtr | : a pointer to storage communicating I/F |
[in] | commTyp | : set the type of interface |
[in] | usingDataPort | : a flag to use data port |
[in] | keyProps | key values for properties of printer |
[in] | keyCount | the count of key values |
char * GetPrinterValue | ( | void * | ptrComm, |
COMM_TYP | commTyp, | ||
bool | usingDataPort, | ||
const char * | key ) |
Get a single setting of printer.
[in] | commPtr | : a pointer to storage communicating I/F |
[in] | commTyp | : set the type of interface |
[in] | usingDataPort | : a flag to use data port |
[in] | key | a key value for setting of printer |
char * GetPrinterValues | ( | void * | ptrComm, |
COMM_TYP | commTyp, | ||
bool | usingDataPort, | ||
const std::vector< std::string > & | keys ) |
Get multiple settings of printer.
[in] | commPtr | : a pointer to storage communicating I/F |
[in] | commTyp | : set the type of interface |
[in] | usingDataPort | : a flag to use data port |
[in] | keys | multiple key values for setting of printer |
bool GetRfidReportListening | ( | ) |
Get the flag of RFID report listening.
void MessengerGet | ( | void * | ptrComm, |
COMM_TYP | commTyp, | ||
int | maxInputMsgCapacity, | ||
bool | usingDataPort ) |
Creates a channel for sending/receiving management messages with a maximum capacity specified.
[out] | ptrComm | : a pointer to storage communicating I/F |
[in] | commTyp | : set the type of interface enum COMM_TYP { TCP_COMM = 1 }; |
[in] | maxInputMsgCapacity | : the default value is MAX_INPUT_MSG_CAPACITY(20) |
[in] | usingDataPort | : the default value is false |
void MessengerReadNextMsg | ( | const char ** | strNextMsg | ) |
Read next message that may have been received asynchronously from printer.
[0ut] | strNextMsg : a buffer to storage the next returned message |
void MessengerRelease | ( | ) |
Release the Messenger resource.
void MessengerSendMsg | ( | char * | strCommand, |
char * | strContent ) |
Send a management command and data/content to printer.
[in] | strCommand | : a management command string |
[in] | strContent | : a management data/content string |
void MessengerSendMsgAndWaitForResponse | ( | char * | strCommand, |
char * | strContent, | ||
int | maxWaitTimeSecs, | ||
const char ** | strResponse ) |
Send a management command and data/content to printer and wait for response maxWaitTimeSecs time.
[in] | strCommand | : a management command string |
[in] | strContent | : a management data/content string |
[in] | maxWaitTimeSecs | : a maximum waiting time |
[out] | strResponse | : a buffer to storage for JSON string response |
int MessengerUnreadMsgCount | ( | ) |
Get the count for the unread messages.
void OdvMonitorConnection | ( | char * | lpAddress | ) |
Use NET I/F to connect the printer for ODV monitor function.
[in] | lpAddress | : IP address |
void OdvMonitorDispose | ( | ) |
Release ODV monitor resource.
void PrinterMonitorConnection | ( | char * | lpAddress, |
INFO_TYP | InfoTyp ) |
Use NET I/F to connect the printer for the status of printer monitor.
[in] | lpAddress | : IP address |
[in] | InfoTyp | : Set the type for RFID or ODV information |
void PrinterMonitorDispose | ( | INFO_TYP | InfoTyp | ) |
Release printer monitor resource.
[in] | InfoTyp | : Set the type for RFID/ODV/printer status information |
void RfidMonitorConnection | ( | char * | lpAddress | ) |
Use NET I/F to connect the printer for RFID monitor function.
[in] | lpAddress | : IP address |
void RfidMonitorDispose | ( | ) |
Release RFID monitor resource.
void SetAlertStatusCallback | ( | void | callbackconst std::vector< std::string > &alert | ) |
Set a callback function to get alert status.
[in] | callback | :a callback function |
void SetAlertStatusListening | ( | bool | value | ) |
Set the flag of printer report listening for alert status.
[in] | value | : a flag to set printer report listening |
void SetDisplayStatusCallback | ( | void | callbackconst std::vector< std::string > &newDisplayText | ) |
Set a callback function to get display status.
[in] | callback | :a callback function |
void SetDisplayStatusListening | ( | bool | value | ) |
Set the flag of printer report listening for display status.
[in] | value | : a flag to set printer report listening |
void SetEngineStatusCallback | ( | void | callbackconst std::string &engineState | ) |
Set a callback function to get engine status.
[in] | callback | :a callback function |
void SetEngineStatusListening | ( | bool | value | ) |
Set the flag of printer report listening for engine status.
[in] | value | : a flag to set printer report listening |
void SetOdvReportCallback | ( | void | callbackconst OdvReport &report | ) |
Set a callback function to get ODV report.
[in] | callback | :a callback function |
void SetOdvReportListening | ( | bool | value | ) |
Set the flag of ODV report listening.
[in] | value | : a flag to set ODV report listening |
bool SetPrinterConfig | ( | void * | ptrComm, |
COMM_TYP | commTyp, | ||
bool | usingDataPort, | ||
char * | pConfig ) |
Set a single configuration of printer.
[in] | commPtr | : a pointer to storage communicating I/F |
[in] | commTyp | : set the type of interface |
[in] | usingDataPort | : a flag to use data port |
[in] | pConfig | : a configuration |
bool SetPrinterValue | ( | void * | ptrComm, |
COMM_TYP | commTyp, | ||
bool | usingDataPort, | ||
const char * | key, | ||
const char * | value ) |
Set a single setting of printer.
[in] | commPtr | : a pointer to storage communicating I/F |
[in] | commTyp | : set the type of interface |
[in] | usingDataPort | : a flag to use data port |
[in] | key | a key value for setting of printer |
[in] | value | a setting of printer |
bool SetPrinterValues | ( | void * | ptrComm, |
COMM_TYP | commTyp, | ||
bool | usingDataPort, | ||
std::map< std::string, std::string > * | keysToSet ) |
Set multiple settings of printer.
[in] | commPtr | : a pointer to storage communicating I/F |
[in] | commTyp | : set the type of interface |
[in] | usingDataPort | : a flag to use data port |
[in] | keysToSet | multiple key values for setting of printer |
void SetRfidReportCallback | ( | void | callbackconst RfidReport &report | ) |
Set a callback function to get RFID report.
[in] | callback | :a callback function |
void SetRfidReportListening | ( | bool | value | ) |
Set the flag of RFID report listening.
[in] | value | : a flag to set RFID report listening |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |