14#ifndef DOTDOT_MQTT_TRANSLATORS_H
15#define DOTDOT_MQTT_TRANSLATORS_H
21#include <nlohmann/json.hpp>
34 field.
ProvisioningMode = jsn.at(
"ProvisioningMode").get_ptr<
const std::string*>()->c_str();
36 field.
SecurityCode = jsn.at(
"SecurityCode").get_ptr<
const std::string*>()->c_str();
37 field.
Unid = jsn.at(
"Unid").get_ptr<
const std::string*>()->c_str();
53 jsn[
"Unid"] = field.
Unid;
66 jsn.at(
"State").get_to(field.
State);
67 field.
SupportedStateList = jsn.at(
"SupportedStateList").get_ptr<
const std::string*>()->c_str();
81 jsn[
"State"] = field.
State;
96 field.
ClusterName = jsn.at(
"ClusterName").get_ptr<
const std::string*>()->c_str();
97 field.
DestinationUnid = jsn.at(
"DestinationUnid").get_ptr<
const std::string*>()->c_str();
125 jsn.at(
"Value").get_to(field.
Value);
126 field.
Name = jsn.at(
"Name").get_ptr<
const std::string*>()->c_str();
127 field.
Info = jsn.at(
"Info").get_ptr<
const std::string*>()->c_str();
132 jsn.at(
"ReadOnly").get_to(field.
ReadOnly);
133 jsn.at(
"Advanced").get_to(field.
Advanced);
147 jsn[
"Value"] = field.
Value;
148 jsn[
"Name"] = field.
Name;
149 jsn[
"Info"] = field.
Info;
228 jsn.at(
"DeviceType").get_to(field.
DeviceType);
229 jsn.at(
"Revision").get_to(field.
Revision);
254 field.
UUID = jsn.at(
"UUID").get_ptr<
const std::string*>()->c_str();
255 jsn.at(
"ReadCount").get_to(field.
ReadCount);
256 jsn.at(
"WriteCount").get_to(field.
WriteCount);
257 jsn.at(
"ReadBytes").get_to(field.
ReadBytes);
258 jsn.at(
"WriteBytes").get_to(field.
WriteBytes);
270 jsn[
"UUID"] = field.
UUID;
286 field.
UUID = jsn.at(
"UUID").get_ptr<
const std::string*>()->c_str();
300 jsn[
"UUID"] = field.
UUID;
314 field.
ApplicationId = jsn.at(
"ApplicationId").get_ptr<
const std::string*>()->c_str();
315 jsn.at(
"X").get_to(field.
X);
316 jsn.at(
"Y").get_to(field.
Y);
317 jsn.at(
"Z").get_to(field.
Z);
318 jsn.at(
"DeviationX").get_to(field.
DeviationX);
319 jsn.at(
"DeviationY").get_to(field.
DeviationY);
320 jsn.at(
"DeviationZ").get_to(field.
DeviationZ);
321 jsn.at(
"Sequence").get_to(field.
Sequence);
352 jsn.at(
"ZoneID").get_to(field.
ZoneID);
353 jsn.at(
"ZoneStatus").get_to(field.
ZoneStatus);
365 jsn[
"ZoneID"] = field.
ZoneID;
378 jsn.at(
"Min").get_to(field.
Min);
379 jsn.at(
"Max").get_to(field.
Max);
391 jsn[
"Min"] = field.
Min;
392 jsn[
"Max"] = field.
Max;
404 field.
InterfaceName = jsn.at(
"InterfaceName").get_ptr<
const std::string*>()->c_str();
405 jsn.at(
"BytesSent").get_to(field.
BytesSent);
409 jsn.at(
"ErrorsIn").get_to(field.
ErrorsIn);
410 jsn.at(
"ErrorsOut").get_to(field.
ErrorsOut);
411 jsn.at(
"DropIn").get_to(field.
DropIn);
412 jsn.at(
"DropOut").get_to(field.
DropOut);
431 jsn[
"DropIn"] = field.
DropIn;
432 jsn[
"DropOut"] = field.
DropOut;
444 jsn.at(
"ClusterId").get_to(field.
ClusterId);
445 field.
ExtensionFieldSet = jsn.at(
"ExtensionFieldSet").get_ptr<
const std::string*>()->c_str();
470 jsn.at(
"SceneID").get_to(field.
SceneID);
471 jsn.at(
"GroupID").get_to(field.
GroupID);
472 field.
SceneName = jsn.at(
"SceneName").get_ptr<
const std::string*>()->c_str();
475 field.
SceneTableExtensions = jsn.at(
"SceneTableExtensions").get_ptr<
const std::string*>()->c_str();
487 jsn[
"SceneID"] = field.
SceneID;
488 jsn[
"GroupID"] = field.
GroupID;
504 jsn.at(
"Azimuth").get_to(field.
Azimuth);
505 jsn.at(
"Elevation").get_to(field.
Elevation);
506 jsn.at(
"Distance").get_to(field.
Distance);
518 jsn[
"Azimuth"] = field.
Azimuth;
560 field.
InterfaceName = jsn.at(
"InterfaceName").get_ptr<
const std::string*>()->c_str();
void from_json(const nlohmann::json &jsn, NM_StateParameters &field)
Definition: dotdot_mqtt_translators.h:32
void to_json(nlohmann::json &jsn, const NM_StateParameters &field)
Definition: dotdot_mqtt_translators.h:48
Definition: zap-types.h:2167
uint8_t DestinationEp
Definition: zap-types.h:2170
const char * ClusterName
Definition: zap-types.h:2168
const char * DestinationUnid
Definition: zap-types.h:2169
Definition: zap-types.h:2174
int64_t MaximumValue
Definition: zap-types.h:2180
int64_t MinimumValue
Definition: zap-types.h:2179
bool Advanced
Definition: zap-types.h:2184
bool AlteringCapabilities
Definition: zap-types.h:2185
int64_t DefaultValue
Definition: zap-types.h:2181
uint16_t ParameterId
Definition: zap-types.h:2175
int64_t Value
Definition: zap-types.h:2176
bool ReadOnly
Definition: zap-types.h:2183
const char * Info
Definition: zap-types.h:2178
uint8_t DisplayFormat
Definition: zap-types.h:2182
const char * Name
Definition: zap-types.h:2177
Definition: zap-types.h:2189
double CoordinateX
Definition: zap-types.h:2190
double OrientationZ
Definition: zap-types.h:2195
double OrientationX
Definition: zap-types.h:2193
double OrientationY
Definition: zap-types.h:2194
double CoordinateZ
Definition: zap-types.h:2192
double CoordinateY
Definition: zap-types.h:2191
Definition: zap-types.h:2199
CredentialTypeEnum CredentialType
Definition: zap-types.h:2200
uint16_t CredentialIndex
Definition: zap-types.h:2201
Definition: zap-types.h:2205
uint16_t Revision
Definition: zap-types.h:2207
DevTypeId DeviceType
Definition: zap-types.h:2206
Definition: zap-types.h:2211
uint64_t ReadCount
Definition: zap-types.h:2213
uint64_t WriteCount
Definition: zap-types.h:2214
uint64_t ReadBytes
Definition: zap-types.h:2215
uint64_t WriteBytes
Definition: zap-types.h:2216
const char * UUID
Definition: zap-types.h:2212
Definition: zap-types.h:2220
double FreeSpaceMB
Definition: zap-types.h:2223
double UsagePercent
Definition: zap-types.h:2222
const char * UUID
Definition: zap-types.h:2221
Definition: zap-types.h:2227
double DeviationY
Definition: zap-types.h:2233
double Z
Definition: zap-types.h:2231
double Y
Definition: zap-types.h:2230
double X
Definition: zap-types.h:2229
const char * ApplicationId
Definition: zap-types.h:2228
double DeviationZ
Definition: zap-types.h:2234
int32_t Sequence
Definition: zap-types.h:2235
double DeviationX
Definition: zap-types.h:2232
Definition: zap-types.h:2239
uint8_t ZoneID
Definition: zap-types.h:2240
uint16_t ZoneStatus
Definition: zap-types.h:2241
Definition: zap-types.h:2245
double Min
Definition: zap-types.h:2246
double Max
Definition: zap-types.h:2247
Definition: zap-types.h:2150
bool UserAccept
Definition: zap-types.h:2152
const char * SecurityCode
Definition: zap-types.h:2153
const char * ProvisioningMode
Definition: zap-types.h:2151
bool AllowMultipleInclusions
Definition: zap-types.h:2155
const char * Unid
Definition: zap-types.h:2154
Definition: zap-types.h:2251
uint64_t ErrorsIn
Definition: zap-types.h:2257
uint64_t ErrorsOut
Definition: zap-types.h:2258
uint64_t PacketsSent
Definition: zap-types.h:2255
uint64_t DropOut
Definition: zap-types.h:2260
uint64_t PacketsReceived
Definition: zap-types.h:2256
uint64_t BytesReceived
Definition: zap-types.h:2254
uint64_t BytesSent
Definition: zap-types.h:2253
const char * InterfaceName
Definition: zap-types.h:2252
uint64_t DropIn
Definition: zap-types.h:2259
Definition: zap-types.h:2159
NM_State State
Definition: zap-types.h:2160
const char * RequestedStateParameters
Definition: zap-types.h:2163
NM_StateParameters StateParameters
Definition: zap-types.h:2162
const char * SupportedStateList
Definition: zap-types.h:2161
Definition: zap-types.h:2264
uint16_t ClusterId
Definition: zap-types.h:2265
const char * ExtensionFieldSet
Definition: zap-types.h:2266
Definition: zap-types.h:2270
uint16_t TransitionTime
Definition: zap-types.h:2274
const char * SceneTableExtensions
Definition: zap-types.h:2276
const char * SceneName
Definition: zap-types.h:2273
uint8_t TransitionTime100ms
Definition: zap-types.h:2275
uint16_t GroupID
Definition: zap-types.h:2272
uint16_t SceneID
Definition: zap-types.h:2271
Definition: zap-types.h:2280
double Distance
Definition: zap-types.h:2283
double Elevation
Definition: zap-types.h:2282
double Azimuth
Definition: zap-types.h:2281
Definition: zap-types.h:2287
int16_t HeatSetPoint
Definition: zap-types.h:2289
uint16_t TransitionTime
Definition: zap-types.h:2288
int16_t CoolSetPoint
Definition: zap-types.h:2290
Definition: zap-types.h:2294
const char * InterfaceName
Definition: zap-types.h:2295
double SignalStrengthdBm
Definition: zap-types.h:2296