#include "pch.h"
#include "framework.h"
#include "JsonSDK.h"
#include "JsonMng.h"
#include "RfidMonitor.h"
#include "OdvMonitor.h"
#include "PrinterMonitor.h"
Enumerations | |
enum | INFO_TYP { ODV_TYP = 0 , RFID_TYP , PRINTER_TYP } |
Functions | |
DLLEXVOID | MessengerGet (CObject *ptrComm, COMM_TYP commTyp, int maxInputMsgCapacity, bool usingDataPort) |
Creates a channel for sending/receiving management messages with a maximum capacity specified. | |
DLLEXVOID | MessengerRelease () |
Release the Messenger resource. | |
DLLEXVOID | MessengerSendMsg (char *strCommand, char *strContent) |
Send a management command and data/content to printer. | |
DLLEXVOID | MessengerReadNextMsg (const char **strNextMsg) |
Read next message that may have been received asynchronously from printer. | |
DLLEXVOID | 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. | |
DLLEXINT | MessengerUnreadMsgCount () |
Get the count for the unread messages. | |
DLLEXVOID | RfidMonitorConnection (char *lpAddress) |
Use NET I/F to connect the printer for RFID monitor function. | |
DLLEXVOID | OdvMonitorConnection (char *lpAddress) |
Use NET I/F to connect the printer for ODV monitor function. | |
DLLEXVOID | PrinterMonitorConnection (char *lpAddress, INFO_TYP InfoTyp) |
Use NET I/F to connect the printer for the status of printer monitor. | |
DLLEXVOID | GetPrinterInfo (stPrinterInfo *pPrtInfo, INFO_TYP InfoTyp) |
Get the information for printer function. | |
DLLEXBOOL | GetRfidReportListening () |
Get the flag of RFID report listening. | |
DLLEXVOID | SetRfidReportListening (bool value) |
Set the flag of RFID report listening. | |
DLLEXBOOL | GetOdvReportListening () |
Get the flag of ODV report listening. | |
DLLEXVOID | SetOdvReportListening (bool value) |
Set the flag of ODV report listening. | |
DLLEXVOID | RfidMonitorDispose () |
Release RFID monitor resource. | |
DLLEXVOID | OdvMonitorDispose () |
Release ODV monitor resource. | |
DLLEXVOID | PrinterMonitorDispose (INFO_TYP InfoTyp) |
Release printer monitor resource. | |
DLLEXVOID | SetRfidReportCallback (void callback(const RfidReport &report)) |
Set a callback function to get RFID report. | |
DLLEXVOID | SetOdvReportCallback (void callback(const OdvReport &report)) |
Set a callback function to get ODV report. | |
DLLEXVOID | SetEngineStatusListening (bool value) |
Set the flag of printer report listening for engine status. | |
DLLEXVOID | SetDisplayStatusListening (bool value) |
Set the flag of printer report listening for display status. | |
DLLEXVOID | SetAlertStatusListening (bool value) |
Set the flag of printer report listening for alert status. | |
DLLEXBOOL | GetEngineStatusListening () |
Get the flag of engine status listening. | |
DLLEXBOOL | GetDisplayStatusListening () |
Get the flag of display status listening. | |
DLLEXBOOL | GetAlertStatusListening () |
Get the flag of alert status listening. | |
DLLEXVOID | SetEngineStatusCallback (void callback(const std::string &engineState)) |
Set a callback function to get engine status. | |
DLLEXVOID | SetDisplayStatusCallback (void callback(const std::vector< std::string > &newDisplayText)) |
Set a callback function to get display status. | |
DLLEXVOID | SetAlertStatusCallback (void callback(const std::vector< std::string > &alert)) |
Set a callback function to get alert status. | |
DLLEXPCHAR | GetPrinterAllValues (CObject *ptrComm, COMM_TYP commTyp, bool usingDataPort) |
Get all settings of printer. | |
DLLEXPCHAR | GetPrinterValue (CObject *ptrComm, COMM_TYP commTyp, bool usingDataPort, const char *key) |
Get a single setting of printer. | |
DLLEXPCHAR | GetPrinterValues (CObject *ptrComm, COMM_TYP commTyp, bool usingDataPort, const std::vector< std::string > &keys) |
Get multiple settings of printer. | |
DLLEXBOOL | SetPrinterValue (CObject *ptrComm, COMM_TYP commTyp, bool usingDataPort, const char *key, const char *value) |
Set a single setting of printer. | |
DLLEXBOOL | SetPrinterValues (CObject *ptrComm, COMM_TYP commTyp, bool usingDataPort, std::map< std::string, std::string > *keysToSet) |
Set multiple settings of printer. | |
DLLEXPCHAR | GetPrinterProperties (CObject *ptrComm, COMM_TYP commTyp, bool usingDataPort, const char *key) |
Get a single property of printer. | |
DLLEXPCHAR | GetPrinterPropertiesEx (CObject *ptrComm, COMM_TYP commTyp, bool usingDataPort, const char *keys[], size_t count) |
Get multiple properties of printer. | |
DLLEXPCHAR | GetPrinterAllProperties (CObject *ptrComm, COMM_TYP commTyp, bool usingDataPort) |
Get all properties of printer. | |
DLLEXVOID | FreeString (char *str) |
Release string resource. | |
DLLEXPCHAR | GetPrinterConfig (CObject *ptrComm, COMM_TYP commTyp, bool usingDataPort, int CfgNumber) |
Get a single configuration of printer. | |
DLLEXBOOL | SetPrinterConfig (CObject *ptrComm, COMM_TYP commTyp, bool usingDataPort, char *pConfig) |
Set a single configuration of printer. | |
DLLEXPCHAR | GetPrinterAllConfig (CObject *ptrComm, COMM_TYP commTyp, bool usingDataPort) |
Get all configurations of printer. | |
Variables | |
CJsonSDKApp | theApp |
JsonMessenger | gJsonMessenger |
RfidMonitor | gRfidMonitor |
RfidReport | gRfidReport |
OdvMonitor | gOdvMonitor |
PrinterMonitor | gPrinterMonitor_Rfid |
PrinterMonitor | gPrinterMonitor_Odv |
PrinterMonitor | gPrinterMonitor |
static std::string | AllMsg |
enum INFO_TYP |
DLLEXVOID FreeString | ( | char * | str | ) |
Release string resource.
[in] | str | : a string resource |
DLLEXBOOL GetAlertStatusListening | ( | ) |
Get the flag of alert status listening.
DLLEXBOOL GetDisplayStatusListening | ( | ) |
Get the flag of display status listening.
DLLEXBOOL GetEngineStatusListening | ( | ) |
Get the flag of engine status listening.
DLLEXBOOL GetOdvReportListening | ( | ) |
Get the flag of ODV report listening.
DLLEXPCHAR GetPrinterAllConfig | ( | CObject * | 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 |
DLLEXPCHAR GetPrinterAllProperties | ( | CObject * | 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 |
DLLEXPCHAR GetPrinterAllValues | ( | CObject * | 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 |
DLLEXPCHAR GetPrinterConfig | ( | CObject * | 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 |
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 |
DLLEXPCHAR GetPrinterProperties | ( | CObject * | 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 |
DLLEXPCHAR GetPrinterPropertiesEx | ( | CObject * | 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 |
DLLEXPCHAR GetPrinterValue | ( | CObject * | 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 |
DLLEXPCHAR GetPrinterValues | ( | CObject * | 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 |
DLLEXBOOL GetRfidReportListening | ( | ) |
Get the flag of RFID report listening.
DLLEXVOID MessengerGet | ( | CObject * | 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 |
DLLEXVOID 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 |
DLLEXVOID MessengerRelease | ( | ) |
Release the Messenger resource.
DLLEXVOID 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 |
DLLEXVOID 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 |
DLLEXINT MessengerUnreadMsgCount | ( | ) |
Get the count for the unread messages.
DLLEXVOID OdvMonitorConnection | ( | char * | lpAddress | ) |
Use NET I/F to connect the printer for ODV monitor function.
[in] | lpAddress | : IP address |
DLLEXVOID OdvMonitorDispose | ( | ) |
Release ODV monitor resource.
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 |
Release printer monitor resource.
[in] | InfoTyp | : Set the type for RFID/ODV/printer status information |
DLLEXVOID RfidMonitorConnection | ( | char * | lpAddress | ) |
Use NET I/F to connect the printer for RFID monitor function.
[in] | lpAddress | : IP address |
DLLEXVOID RfidMonitorDispose | ( | ) |
Release RFID monitor resource.
DLLEXVOID SetAlertStatusCallback | ( | void | callbackconst std::vector< std::string > &alert | ) |
Set a callback function to get alert status.
[in] | callback | :a callback function |
DLLEXVOID SetAlertStatusListening | ( | bool | value | ) |
Set the flag of printer report listening for alert status.
[in] | value | : a flag to set printer report listening |
DLLEXVOID SetDisplayStatusCallback | ( | void | callbackconst std::vector< std::string > &newDisplayText | ) |
Set a callback function to get display status.
[in] | callback | :a callback function |
DLLEXVOID SetDisplayStatusListening | ( | bool | value | ) |
Set the flag of printer report listening for display status.
[in] | value | : a flag to set printer report listening |
DLLEXVOID SetEngineStatusCallback | ( | void | callbackconst std::string &engineState | ) |
Set a callback function to get engine status.
[in] | callback | :a callback function |
DLLEXVOID SetEngineStatusListening | ( | bool | value | ) |
Set the flag of printer report listening for engine status.
[in] | value | : a flag to set printer report listening |
DLLEXVOID SetOdvReportCallback | ( | void | callbackconst OdvReport &report | ) |
Set a callback function to get ODV report.
[in] | callback | :a callback function |
DLLEXVOID SetOdvReportListening | ( | bool | value | ) |
Set the flag of ODV report listening.
[in] | value | : a flag to set ODV report listening |
DLLEXBOOL SetPrinterConfig | ( | CObject * | 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 |
DLLEXBOOL SetPrinterValue | ( | CObject * | 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 |
DLLEXBOOL SetPrinterValues | ( | CObject * | 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 |
DLLEXVOID SetRfidReportCallback | ( | void | callbackconst RfidReport &report | ) |
Set a callback function to get RFID report.
[in] | callback | :a callback function |
DLLEXVOID SetRfidReportListening | ( | bool | value | ) |
Set the flag of RFID report listening.
[in] | value | : a flag to set RFID report listening |
|
static |
JsonMessenger gJsonMessenger |
OdvMonitor gOdvMonitor |
PrinterMonitor gPrinterMonitor |
PrinterMonitor gPrinterMonitor_Odv |
PrinterMonitor gPrinterMonitor_Rfid |
RfidMonitor gRfidMonitor |
RfidReport gRfidReport |
CJsonSDKApp theApp |