8. Gatewayアプリケーションの起動
#include <stdio.h>
#include "gateway.h"
int main(int argc, char** argv)
{
GATEWAY_HANDLE gateway;
if (argc != 2)
{
printf("usage: start_gw configFilen");
printf("where configFile is the name of the file that contains the Gateway configurationn");
}
else
{
if ((gateway = Gateway_CreateFromJson(argv[1])) == NULL)
{
printf("failed to create the gateway from JSONn");
}
else
{
printf("gateway successfully created from JSONn");
printf("gateway shall run until ENTER is pressedn");
(void)getchar();
Gateway_Destroy(gateway);
}
}
return 0;
}
C:>start_gw definition_file_path
※C言語のみ