29double *
corr(
char*
id);
38 char command_to_python[BUFSIZ];
39 sprintf(command_to_python,
"start vanet.exe -main \"%s\" ",
sumoname);
40 fprintf(stderr,
"Executing command for opening Sumo - %s",command_to_python);
41 system(command_to_python);
42 fprintf(stderr,
"....done.\n");
43 printf(
"Init sumo pipe\n");
53 double dPresentTime = pstruMobilityVar->
dLastTime;
63 if (coordinates!=NULL)
94 DWORD cbToWrite, cbWritten;
96 char message_to_be_sent[2];
98 LPCSTR lpszPipename =
"\\\\.\\pipe\\netsim_sumo_pipe";
102 fprintf(stderr,
"Creating Sumo pipe\n");
118 if (
hPipe != INVALID_HANDLE_VALUE)
123 fprintf(stderr,
"Connecting Sumo and NetSim in real time\n");
124 dwMode = PIPE_READMODE_MESSAGE;
125 fSuccess = SetNamedPipeHandleState
136 fprintf(stderr,
"Connection done\n");
144 message_to_be_sent[0]=
gui;
145 message_to_be_sent[1]=0;
147 cbToWrite=(
DWORD)strlen(message_to_be_sent);
165 DWORD cbRead, cbToWrite, cbWritten;
192 cbToWrite=(
DWORD)strlen(
id)+1;
271 coordinates = (
double*)
malloc(2*
sizeof* coordinates);
272 coordinates[0]=xcor1;
273 coordinates[1]=ycor1;
274 return (coordinates);
ANIM_FLAG anim_get_anim_flag()
#define fnSystemError(x,...)
#define WriteFile(file, str, size, a, b)
void mobility_pass_position_to_animation(NETSIM_ID devId, double time, NetSim_COORDINATES *coor)
#define DEVICE_NAME(DeviceId)
EXPORTED struct stru_NetSim_Network * NETWORK
EXPORTED struct stru_NetSim_EventDetails * pstruEventDetails
#define DEVICE_POSITION(DeviceId)
#define fnpAddEvent(pstruEvent)
struct stru_NetSim_Coordinates * pstruDevicePosition
struct stru_NetSim_Mobility * pstruDeviceMobility
struct stru_NetSim_Coordinates * pstruNextPosition
struct stru_NetSim_Coordinates * pstruCurrentPosition
double dPauseTime
To store the pause time.
double dLastTime
Represent the devices last move time.
struct stru_NetSim_Device ** ppstruDeviceList