예제 #1
0
파일: Control.cpp 프로젝트: stagma/firmware
void Control::serialize(JSON::Adapter& adapter) {
    JSON::Class root(adapter, "Control");
    JSON_E(adapter, pids);
    JSON_E(adapter, sensors);
    JSON_E(adapter, actuators);
    JSON_T(adapter, setpoints);
}
예제 #2
0
파일: Wifi.cpp 프로젝트: inomuh/rfkon
// each class requires a public serialize function
void Wifi::serialize( JSON::Adapter& adapter )
{
    // this pattern is required
    JSON::Class root( adapter, "wifis" );

    // Use the _E variant to able to add more instance
    JSON_E( adapter, ssidAndMac );
    // this is the last member variable we serialize so use the _T variant
    JSON_T( adapter, dbm );
}