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 };
65 uint8_t m_PTPProfileSpecific, m_domainNumber, m_versionPTP, m_minorVersionPTP;
66 uint16_t m_sequenceId;
192 uint32_t
sdoId()
const {
return m_sdoId; }
223 return message.
setAction(m_action, m_managementId, m_tlvData.get());
227 __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:116
bool haveVersionPTP() const
Definition: json.h:167
uint32_t sdoId() const
Definition: json.h:192
bool haveSdoId() const
Definition: json.h:197
actionField_e actionField() const
Definition: json.h:127
bool haveDomainNumber() const
Definition: json.h:157
uint8_t PTPProfileSpecific() const
Definition: json.h:142
uint8_t versionPTP() const
Definition: json.h:162
bool havePTPProfileSpecific() const
Definition: json.h:147
uint8_t domainNumber() const
Definition: json.h:152
bool fromJsonObj(const void *jobj)
bool isUnicast() const
Definition: json.h:132
bool haveSequenceId() const
Definition: json.h:187
bool fromJson(const std::string &json)
static bool isLibShared()
const PortIdentity_t & srcPort() const
Definition: json.h:202
bool haveSrcPort() const
Definition: json.h:207
bool setAction(Message &message) const
Definition: json.h:222
const BaseMngTlv * dataField() const
Definition: json.h:122
static bool selectLib(const std::string &libName)
const PortIdentity_t & dstPort() const
Definition: json.h:212
static const char * loadLibrary()
uint16_t sequenceId() const
Definition: json.h:182
bool haveMinorVersionPTP() const
Definition: json.h:177
bool haveDstPort() const
Definition: json.h:217
uint8_t minorVersionPTP() const
Definition: json.h:172
bool haveIsUnicast() const
Definition: json.h:137
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