本文整理汇总了C++中JsonObject::createNestedArray方法的典型用法代码示例。如果您正苦于以下问题:C++ JsonObject::createNestedArray方法的具体用法?C++ JsonObject::createNestedArray怎么用?C++ JsonObject::createNestedArray使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JsonObject
的用法示例。
在下文中一共展示了JsonObject::createNestedArray方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getRooms
void cRooms::getRooms( JsonObject& root )
{
JsonArray& RoomsTypes = root.createNestedArray("RTypes");
JsonArray& RoomsTemps = root.createNestedArray("RTs");
for (int i = 0; i<nRooms;i++){
RoomsTypes.add(Room[i].RoomType);
}
for (int i = 0; i<nRoomTypes;i++){
RoomsTemps.add(MasterSpTemps[i]);
}
root["SetType"] = SetType;
}
示例2: getData
void cRooms::getData( JsonObject& root )
{
JsonArray& RoomsIsTemps = root.createNestedArray("RTi");
JsonArray& RoomsSPTemps = root.createNestedArray("RTs");
JsonArray& RoomsNeeds = root.createNestedArray("Rneed");
for (int i = 0; i<nRooms;i++){
RoomsIsTemps.add(Room[i].IsTemp.get());
RoomsSPTemps.add(Room[i].getSpTemp());
RoomsNeeds.add(Room[i].getNeed());
}
root["Toutside"] = TempOutside.get();
root["Rn"] = static_cast<int>( active());
root["RTsHeating"] = getSpHeating();
root["RTitoR"] = IsTempHeatingLead.get();
root["RTitoSys"] = IsTempHeatingReturn.get();
root["RP"] = Pump.get();
root["RM"] = Mixer.get();
}
示例3: getOffsetTemp
void cRooms::getOffsetTemp( JsonObject& root )
{
JsonArray& temps = root.createNestedArray("RTo");
// Iterate over all sets (At home, away)
for(int iSet = 0; iSet<nSetTypes; iSet++)
{
for(int iRoomType = 0; iRoomType<nRoomTypes; iRoomType++) // Iterate over all Roomtypes (Living, sleeping, hallway, bath, side)
{
for(int iDayType = 0; iDayType<nDayTypes; iDayType++) // Weekend, Workday
{
for(int iSwitch = 0; iSwitch<nSwitch; iSwitch++) // 4 switch times
{
temps.add(TempOffsetSchedule[iSet][iRoomType][iDayType][iSwitch].temp);
}
}
}
}
}
示例4: getOffsetTime
void cRooms::getOffsetTime( JsonObject& root )
{
JsonArray& times = root.createNestedArray("Rt");
// Iterate over all sets (At home, away)
for(int iSet = 0; iSet<nSetTypes; iSet++)
{
for(int iRoomType = 0; iRoomType<nRoomTypes; iRoomType++) // Iterate over all Roomtypes (Living, sleeping, hallway, side)
{
for(int iDayType = 0; iDayType<nDayTypes; iDayType++)
{
for(int iSwitch = 0; iSwitch<nSwitch; iSwitch++)
{
times.add(TempOffsetSchedule[iSet][iRoomType][iDayType][iSwitch].time.totalseconds());
}
}
}
}
}