12 #ifndef __PTPMGMT_JSON_H
13 #define __PTPMGMT_JSON_H
18 __PTPMGMT_NAMESPACE_BEGIN
46 std::unique_ptr<BaseMngTlv> m_tlvData;
48 mng_vals_e m_managementId = NULL_PTP_MANAGEMENT;
53 have_PTPProfileSpecific,
63 bool m_have[have_limit] = {
false };
64 bool m_unicastFlag =
false;
65 uint8_t m_PTPProfileSpecific = 0, m_domainNumber = 0,
66 m_versionPTP = 2, m_minorVersionPTP = 1;
67 uint16_t m_sequenceId = 0;
75 __PTPMGMT_DEPRECATED_DEC(
static bool selectLib(
const std::string &));
76 __PTPMGMT_DEPRECATED_DEC(
static const char *loadLibrary());
77 __PTPMGMT_DEPRECATED_DEC(
static bool isLibShared());
78 __PTPMGMT_DEPRECATED_DEC(
bool fromJsonObj(
const void *));
166 uint32_t
sdoId()
const {
return m_sdoId; }
197 return message.
setAction(m_action, m_managementId, m_tlvData.get());
201 __PTPMGMT_NAMESPACE_END
Convert a management or a signalling message to JSON.
Create and parse PTP management messages.
mng_vals_e managementId() const
Definition: json.h:90
bool haveVersionPTP() const
Definition: json.h:141
uint32_t sdoId() const
Definition: json.h:166
bool haveSdoId() const
Definition: json.h:171
actionField_e actionField() const
Definition: json.h:101
bool haveDomainNumber() const
Definition: json.h:131
uint8_t PTPProfileSpecific() const
Definition: json.h:116
uint8_t versionPTP() const
Definition: json.h:136
bool havePTPProfileSpecific() const
Definition: json.h:121
uint8_t domainNumber() const
Definition: json.h:126
bool isUnicast() const
Definition: json.h:106
bool haveSequenceId() const
Definition: json.h:161
bool fromJson(const std::string &json)
const PortIdentity_t & srcPort() const
Definition: json.h:176
bool haveSrcPort() const
Definition: json.h:181
bool setAction(Message &message) const
Definition: json.h:196
const BaseMngTlv * dataField() const
Definition: json.h:96
const PortIdentity_t & dstPort() const
Definition: json.h:186
uint16_t sequenceId() const
Definition: json.h:156
bool haveMinorVersionPTP() const
Definition: json.h:151
bool haveDstPort() const
Definition: json.h:191
uint8_t minorVersionPTP() const
Definition: json.h:146
bool haveIsUnicast() const
Definition: json.h:111
Handle PTP management message.
Definition: msg.h:58
bool setAction(actionField_e actionField, mng_vals_e tlv_id, const BaseMngTlv *dataSend=nullptr)
__PTPMGMT_NAMESPACE_BEGIN std::string msg2json(const Message &message, int indent=0)
std::string tlv2json(mng_vals_e managementId, const BaseMngTlv *tlv, int indent=0)
mng_vals_e
Management TLVs ID.
Definition: mngIds.h:29
actionField_e
Definition: types.h:191
@ GET
Definition: types.h:192