#ifndef PLATFORM_SCALE_PROPERTIES_H
#define PLATFORM_SCALE_PROPERTIES_H
#include "common/json_util.h"

namespace zsy
{
    struct PlatformScaleProperties
    {
        std::string sn;
        std::string name;
        std::string port;
        uint32_t baudRate{9600};
        uint8_t byteSize{8};
        uint8_t parity{0};
        uint8_t stopBits{0};
    };

    inline void from_json(const nlohmann::json &j, PlatformScaleProperties &o)
    {
        PARSE_JSON(sn, o.sn);
        PARSE_JSON(name, o.name);
        PARSE_JSON(port, o.port);
        PARSE_JSON(baudRate, o.baudRate);
        PARSE_JSON(byteSize, o.byteSize);
        PARSE_JSON(parity, o.parity);
        PARSE_JSON(stopBits, o.stopBits);
    }
}


#endif //PLATFORM_SCALE_PROPERTIES_H
