#include #include #include #include #include #include #include #define RAND(min,max) (rand()%(max-min)+min) using namespace std; using namespace rapidjson; #define N_NODE 10 #define EXTENDED false #define SIMULATION_DURATION 60 #define POWER_OFF 0 #define POWER_ON 10 #define POWER_RX 11 #define POWER_TX 12 #define DATA_SIZE 50 #define USE_HINT false #define WAKE_UP_EVERY 10 #define WAKE_UP_FOR 5 #define MAX_STARTUP_DELAY 10 unsigned int seed = 0; int main(int argc, char **argv){ // Setup seed if(argc>1){ srand( atoi(argv[1]) ); } // Create document Document d; d.SetObject(); d.AddMember("extended",EXTENDED,d.GetAllocator()); // Create nodes Value nodes(kObjectType); for(int i=0;i writer(buffer); d.Accept(writer); cout << buffer.GetString(); return 0; }