IQRF Gateway Daemon
|
ISerializer interface. More...
#include <ISerializer.h>
Public Member Functions | |
virtual const std::string & | getName () const =0 |
virtual std::string | parseCategory (const std::string &request)=0 |
Get category identification from request. More... | |
virtual std::unique_ptr< DpaTask > | parseRequest (const std::string &request)=0 |
Parse DPA request. More... | |
virtual std::string | parseConfig (const std::string &request)=0 |
Parse confiquration request. More... | |
virtual std::string | encodeConfig (const std::string &request, const std::string &response)=0 |
Encode confiquration response. More... | |
virtual std::string | getLastError () const =0 |
Get last error string. More... | |
virtual std::string | encodeAsyncAsDpaRaw (const DpaMessage &dpaMessage) const =0 |
Encode Asynchronous DPA message. More... | |
virtual | ~ISerializer () |
ISerializer interface.
|
inlinevirtual |
|
pure virtual |
Encode Asynchronous DPA message.
[in] | dpaMessage | message to be encoded |
Passed asynchronous DPA message is serialized in an appropriate form.
Implemented in JsonSerializer, and SimpleSerializer.
|
pure virtual |
Encode confiquration response.
[in] | request | original configuration request |
[in] | response | string with response phrase |
Encode configuration response based on original configuration request and passed response phrase.
Implemented in JsonSerializer, and SimpleSerializer.
|
pure virtual |
Get last error string.
Serializer sets last error string as the result of last serialization.
Implemented in JsonSerializer, and SimpleSerializer.
|
pure virtual |
Implemented in JsonSerializer, and SimpleSerializer.
|
pure virtual |
Get category identification from request.
[in] | request | incoming request to be examined |
Extracts a category identification from incoming request. It allows to identify appropriate parsing method to be used in next processing.
Implemented in JsonSerializer, and SimpleSerializer.
|
pure virtual |
Parse confiquration request.
[in] | request | configuration request |
It expects incoming configuration request (detected by parseCategory). It parses the request and return configuration string. The only switch mode forwarding | operational | service is supported now. Returned string may be empty in case of error.
Implemented in JsonSerializer, and SimpleSerializer.
|
pure virtual |
Parse DPA request.
[in] | request | incoming DPA request |
It expects incoming DPA request (detected by parseCategory). It parses DPA request and create DpaTask. DpaTask may be empty in case of error.
Implemented in JsonSerializer, and SimpleSerializer.