Changeset 340


Ignore:
Timestamp:
Apr 13, 2018, 1:00:30 PM (4 years ago)
Author:
coas-nagasima
Message:

NTPクライアント処理を追加

Location:
asp3_tinet_ecnl_rx/trunk
Files:
7 added
55 edited

Legend:

Unmodified
Added
Removed
  • asp3_tinet_ecnl_rx/trunk/app1_usb_watt_meter/Debug/Makefile

    r337 r340  
    188188CFLAGS = $(COPTS) $(CDEFS) $(INCLUDES)
    189189
     190APPLDIRS := $(APPLDIRS) ../../ntshell/echonet
    190191APPL_COBJS := echonet.o echonet_agent.o echonet_dbg.o echonet_fbs.o echonet_task.o echonet_udp_task.o echonet_udp6_task.o fbs_string.o
    191 APPL_COBJS := $(APPL_COBJS) ping.o ping6.o resolver.o dhcp4_cli.o netapp_subr.o
     192APPLDIRS := $(APPLDIRS) $(SRCDIR)/$(TINETDIR)/netapp
     193APPL_COBJS := $(APPL_COBJS) ping.o ping6.o resolver.o dhcp4_cli.o netapp_subr.o ntp_cli.o net_misc.o
     194APPLDIRS := $(APPLDIRS) ../../ntshell/tlsf ../../ntshell/fatfs ../../ntshell/ntshell ../../ntshell/ntshell/core ../../ntshell/ntshell/util ../../ntshell/src
    192195APPL_COBJS := $(APPL_COBJS) mbed_api.o netcmd.o fdtable.o io_stub.o socket_stub.o ffarch.o diskio.o ff.o mmc_rspi.o ccsbcs.o ntshell.o text_editor.o text_history.o usrcmd.o vtrecv.o vtsend.o ntlibc.o ntstdio.o ntopt.o syscall.o tlsf.o
    193196
     
    196199#
    197200APPLNAME = app1_usb_watt_meter
    198 APPLDIRS = ../src ../../ntshell/tlsf ../../ntshell/fatfs ../../ntshell/echonet ../../ntshell/ntshell ../../ntshell/ntshell/core ../../ntshell/ntshell/util ../../ntshell/src $(SRCDIR)/$(TINETDIR)/netapp
     201APPLDIRS := $(APPLDIRS) ../src
    199202APPL_CFG = main.cfg
    200203APPL_CDL = main.cdl
  • asp3_tinet_ecnl_rx/trunk/app1_usb_watt_meter/DebugCitrus/Makefile

    r337 r340  
    188188CFLAGS = $(COPTS) $(CDEFS) $(INCLUDES)
    189189
     190APPLDIRS := $(APPLDIRS) ../../ntshell/echonet
    190191APPL_COBJS := echonet.o echonet_agent.o echonet_dbg.o echonet_fbs.o echonet_task.o echonet_udp_task.o echonet_udp6_task.o fbs_string.o
    191 APPL_COBJS := $(APPL_COBJS) ping.o ping6.o resolver.o dhcp4_cli.o netapp_subr.o
     192APPLDIRS := $(APPLDIRS) $(SRCDIR)/$(TINETDIR)/netapp
     193APPL_COBJS := $(APPL_COBJS) ping.o ping6.o resolver.o dhcp4_cli.o netapp_subr.o ntp_cli.o net_misc.o
     194APPLDIRS := $(APPLDIRS) ../../ntshell/tlsf ../../ntshell/fatfs ../../ntshell/ntshell ../../ntshell/ntshell/core ../../ntshell/ntshell/util ../../ntshell/src
    192195APPL_COBJS := $(APPL_COBJS) mbed_api.o netcmd.o fdtable.o io_stub.o socket_stub.o ffarch.o diskio.o ff.o mmc_rspi.o ccsbcs.o ntshell.o text_editor.o text_history.o usrcmd.o vtrecv.o vtsend.o ntlibc.o ntstdio.o ntopt.o syscall.o tlsf.o
    193196
     
    196199#
    197200APPLNAME = app1_usb_watt_meter
    198 APPLDIRS = ../src ../../ntshell/tlsf ../../ntshell/fatfs ../../ntshell/echonet ../../ntshell/ntshell ../../ntshell/ntshell/core ../../ntshell/ntshell/util ../../ntshell/src $(SRCDIR)/$(TINETDIR)/netapp
     201APPLDIRS := $(APPLDIRS) ../src
    199202APPL_CFG = main.cfg
    200203APPL_CDL = main.cdl
  • asp3_tinet_ecnl_rx/trunk/app1_usb_watt_meter/DebugEther/Makefile

    r337 r340  
    188188CFLAGS = $(COPTS) $(CDEFS) $(INCLUDES)
    189189
     190APPLDIRS := $(APPLDIRS) ../../ntshell/echonet
    190191APPL_COBJS := echonet.o echonet_agent.o echonet_dbg.o echonet_fbs.o echonet_task.o echonet_udp_task.o echonet_udp6_task.o fbs_string.o
    191 APPL_COBJS := $(APPL_COBJS) ping.o ping6.o resolver.o dhcp4_cli.o netapp_subr.o
     192APPLDIRS := $(APPLDIRS) $(SRCDIR)/$(TINETDIR)/netapp
     193APPL_COBJS := $(APPL_COBJS) ping.o ping6.o resolver.o dhcp4_cli.o netapp_subr.o ntp_cli.o net_misc.o
     194APPLDIRS := $(APPLDIRS) ../../ntshell/tlsf ../../ntshell/fatfs ../../ntshell/ntshell ../../ntshell/ntshell/core ../../ntshell/ntshell/util ../../ntshell/src
    192195APPL_COBJS := $(APPL_COBJS) mbed_api.o netcmd.o fdtable.o io_stub.o socket_stub.o ffarch.o diskio.o ff.o mmc_rspi.o ccsbcs.o ntshell.o text_editor.o text_history.o usrcmd.o vtrecv.o vtsend.o ntlibc.o ntstdio.o ntopt.o syscall.o tlsf.o
    193196
     
    196199#
    197200APPLNAME = app1_usb_watt_meter
    198 APPLDIRS = ../src ../../ntshell/tlsf ../../ntshell/fatfs ../../ntshell/echonet ../../ntshell/ntshell ../../ntshell/ntshell/core ../../ntshell/ntshell/util ../../ntshell/src $(SRCDIR)/$(TINETDIR)/netapp
     201APPLDIRS := $(APPLDIRS) ../src
    199202APPL_CFG = main.cfg
    200203APPL_CDL = main.cdl
  • asp3_tinet_ecnl_rx/trunk/app1_usb_watt_meter/src/echonet_main.c

    r337 r340  
    6161
    6262/* TODO: メーカーコードを設定 */
    63 #define MAKER_CODE      0x00, 0x00, 0xB3        /* TOPPERSプロジェクト */
     63#define MAKER_CODE      { 0x00, 0x00, 0xB3 }    /* TOPPERSプロジェクト */
    6464
    6565/* ノードプロファイルオブジェクト */
  • asp3_tinet_ecnl_rx/trunk/app1_usb_watt_meter/src/main.c

    r337 r340  
    7676#include <btstack/utils.h>
    7777#include "client.h"
     78#include "ntp_cli.h"
    7879
    7980ID ws_api_mailboxid = MAIN_DATAQUEUE;
     
    309310        }
    310311
     312        if (link_up && up)
     313                ntp_cli_execute();
     314
    311315        ntshell_change_netif_link(link_up, up);
    312316
     
    338342extern int usrcmd_dhcp4c(int argc, char **argv);
    339343extern int usrcmd_dnsc(int argc, char **argv);
     344extern int usrcmd_ntpc(int argc, char **argv);
    340345
    341346static const cmd_table_t cmdlist[] = {
     
    347352        {"mkdir", "Make directory", usrcmd_mkdir},
    348353        {"hexdump", "Hex dump", usrcmd_hexdump},
     354        {"date", "print date and time", usrcmd_date},
    349355        {"curl", "Command lines or scripts to transfer data", curl_main},
    350356        {"ping", "ping", usrcmd_ping},
    351         {"dhcpc", "DHCP client rel/renew/info", usrcmd_dhcp4c},
     357        {"dhcpc", "DHCP Client rel/renew/info", usrcmd_dhcp4c},
    352358        {"dnsc", "DNS client", usrcmd_dnsc },
     359        {"ntpc", "NTP client", usrcmd_ntpc },
    353360        {"logupload", "Upload log to server", cmd_logupload},
    354361        {"info", "This is a description text string for info command.", usrcmd_info},
  • asp3_tinet_ecnl_rx/trunk/app1_usb_watt_meter/src/main.cfg

    r337 r340  
    5858/* DHCP クライアント */
    5959#include "netapp/dhcp4_cli.h"
    60 INCLUDE("netapp/dhcp4_cli_asp.cfg");
     60//INCLUDE("netapp/dhcp4_cli_asp.cfg");
    6161INCLUDE("netapp/tinet_dhcp4_cli.cfg");
    6262
     
    6565INCLUDE("netapp/resolver_asp.cfg");
    6666INCLUDE("netapp/tinet_resolver.cfg");
     67
     68/* NTPクライアント */
     69#include "ntp_cli.h"
     70//INCLUDE("ntp_cli.cfg");
     71INCLUDE("tinet_ntp_cli.cfg");
     72
     73#include "net_misc.h"
     74INCLUDE("net_misc.cfg");
    6775
    6876/* FatFs */
  • asp3_tinet_ecnl_rx/trunk/app2_light/Debug/Makefile

    r337 r340  
    179179CFLAGS = $(COPTS) $(CDEFS) $(INCLUDES)
    180180
     181APPLDIRS := $(APPLDIRS) ../../ntshell/echonet
    181182APPL_COBJS := echonet.o echonet_agent.o echonet_dbg.o echonet_fbs.o echonet_task.o echonet_udp_task.o echonet_udp6_task.o fbs_string.o
    182 APPL_COBJS := $(APPL_COBJS) ping.o ping6.o resolver.o dhcp4_cli.o netapp_subr.o
     183APPLDIRS := $(APPLDIRS) $(SRCDIR)/$(TINETDIR)/netapp
     184APPL_COBJS := $(APPL_COBJS) ping.o ping6.o resolver.o dhcp4_cli.o netapp_subr.o ntp_cli.o net_misc.o
     185APPLDIRS := $(APPLDIRS) ../../ntshell/tlsf ../../ntshell/fatfs ../../ntshell/ntshell ../../ntshell/ntshell/core ../../ntshell/ntshell/util ../../ntshell/src
    183186APPL_COBJS := $(APPL_COBJS) mbed_api.o netcmd.o fdtable.o io_stub.o socket_stub.o ffarch.o diskio.o ff.o mmc_rspi.o ccsbcs.o ntshell.o text_editor.o text_history.o usrcmd.o vtrecv.o vtsend.o ntlibc.o ntstdio.o ntopt.o syscall.o tlsf.o
    184187
     
    187190#
    188191APPLNAME = app2_light
    189 APPLDIRS = ../src ../../ntshell/tlsf ../../ntshell/fatfs ../../ntshell/echonet ../../ntshell/ntshell ../../ntshell/ntshell/core ../../ntshell/ntshell/util ../../ntshell/src $(SRCDIR)/$(TINETDIR)/netapp
     192APPLDIRS := $(APPLDIRS) ../src
    190193APPL_CFG = main.cfg
    191194APPL_CDL = main.cdl
  • asp3_tinet_ecnl_rx/trunk/app2_light/DebugCitrus/Makefile

    r337 r340  
    179179CFLAGS = $(COPTS) $(CDEFS) $(INCLUDES)
    180180
     181APPLDIRS := $(APPLDIRS) ../../ntshell/echonet
    181182APPL_COBJS := echonet.o echonet_agent.o echonet_dbg.o echonet_fbs.o echonet_task.o echonet_udp_task.o echonet_udp6_task.o fbs_string.o
    182 APPL_COBJS := $(APPL_COBJS) ping.o ping6.o resolver.o dhcp4_cli.o netapp_subr.o
     183APPLDIRS := $(APPLDIRS) $(SRCDIR)/$(TINETDIR)/netapp
     184APPL_COBJS := $(APPL_COBJS) ping.o ping6.o resolver.o dhcp4_cli.o netapp_subr.o ntp_cli.o net_misc.o
     185APPLDIRS := $(APPLDIRS) ../../ntshell/tlsf ../../ntshell/fatfs ../../ntshell/ntshell ../../ntshell/ntshell/core ../../ntshell/ntshell/util ../../ntshell/src
    183186APPL_COBJS := $(APPL_COBJS) mbed_api.o netcmd.o fdtable.o io_stub.o socket_stub.o ffarch.o diskio.o ff.o mmc_rspi.o ccsbcs.o ntshell.o text_editor.o text_history.o usrcmd.o vtrecv.o vtsend.o ntlibc.o ntstdio.o ntopt.o syscall.o tlsf.o
    184187
     
    187190#
    188191APPLNAME = app2_light
    189 APPLDIRS = ../src ../../ntshell/tlsf ../../ntshell/fatfs ../../ntshell/echonet ../../ntshell/ntshell ../../ntshell/ntshell/core ../../ntshell/ntshell/util ../../ntshell/src $(SRCDIR)/$(TINETDIR)/netapp
     192APPLDIRS := $(APPLDIRS) ../src
    190193APPL_CFG = main.cfg
    191194APPL_CDL = main.cdl
  • asp3_tinet_ecnl_rx/trunk/app2_light/DebugEther/Makefile

    r337 r340  
    177177CFLAGS = $(COPTS) $(CDEFS) $(INCLUDES)
    178178
     179APPLDIRS := $(APPLDIRS) ../../ntshell/echonet
    179180APPL_COBJS := echonet.o echonet_agent.o echonet_dbg.o echonet_fbs.o echonet_task.o echonet_udp_task.o echonet_udp6_task.o fbs_string.o
    180 APPL_COBJS := $(APPL_COBJS) ping.o ping6.o resolver.o dhcp4_cli.o netapp_subr.o
     181APPLDIRS := $(APPLDIRS) $(SRCDIR)/$(TINETDIR)/netapp
     182APPL_COBJS := $(APPL_COBJS) ping.o ping6.o resolver.o dhcp4_cli.o netapp_subr.o ntp_cli.o net_misc.o
     183APPLDIRS := $(APPLDIRS) ../../ntshell/tlsf ../../ntshell/fatfs ../../ntshell/ntshell ../../ntshell/ntshell/core ../../ntshell/ntshell/util ../../ntshell/src
    181184APPL_COBJS := $(APPL_COBJS) mbed_api.o netcmd.o fdtable.o io_stub.o socket_stub.o ffarch.o diskio.o ff.o mmc_rspi.o ccsbcs.o ntshell.o text_editor.o text_history.o usrcmd.o vtrecv.o vtsend.o ntlibc.o ntstdio.o ntopt.o syscall.o tlsf.o
    182185
     
    185188#
    186189APPLNAME = app2_light
    187 APPLDIRS = ../src ../../ntshell/tlsf ../../ntshell/fatfs ../../ntshell/echonet ../../ntshell/ntshell ../../ntshell/ntshell/core ../../ntshell/ntshell/util ../../ntshell/src $(SRCDIR)/$(TINETDIR)/netapp
     190APPLDIRS := $(APPLDIRS) ../src
    188191APPL_CFG = main.cfg
    189192APPL_CDL = main.cdl
  • asp3_tinet_ecnl_rx/trunk/app2_light/src/echonet_main.c

    r337 r340  
    5353
    5454/* TODO: メーカーコードを設定 */
    55 #define MAKER_CODE      0x00, 0x00, 0xB3        /* TOPPERSプロジェクト */
     55#define MAKER_CODE      { 0x00, 0x00, 0xB3 }    /* TOPPERSプロジェクト */
    5656
    5757/* ノードプロファイルオブジェクト */
  • asp3_tinet_ecnl_rx/trunk/app2_light/src/main.c

    r337 r340  
    7575#include "ntshell_main.h"
    7676#include <btstack/utils.h>
     77#include "ntp_cli.h"
    7778
    7879ID ws_api_mailboxid = MAIN_DATAQUEUE;
     
    301302        }
    302303
     304        if (link_up && up)
     305                ntp_cli_execute();
     306
    303307        ntshell_change_netif_link(link_up, up);
    304308
     
    308312extern int usrcmd_ping(int argc, char **argv);
    309313extern int usrcmd_dhcp4c(int argc, char **argv);
     314extern int usrcmd_dnsc(int argc, char **argv);
    310315
    311316static const cmd_table_t cmdlist[] = {
     
    317322        {"mkdir", "Make directory", usrcmd_mkdir},
    318323        {"hexdump", "Hex dump", usrcmd_hexdump},
     324        {"date", "print date and time", usrcmd_date},
    319325        {"ping", "ping", usrcmd_ping},
    320326        {"dhcpc", "DHCP Client rel/renew/info", usrcmd_dhcp4c},
     327        {"dnsc", "DNS client", usrcmd_dnsc },
    321328        {"info", "This is a description text string for info command.", usrcmd_info},
    322329        {"exit", "Exit Natural Tiny Shell", usrcmd_exit},
  • asp3_tinet_ecnl_rx/trunk/app2_light/src/main.cfg

    r337 r340  
    5858/* DHCP クライアント */
    5959#include "netapp/dhcp4_cli.h"
    60 INCLUDE("netapp/dhcp4_cli_asp.cfg");
     60//INCLUDE("netapp/dhcp4_cli_asp.cfg");
    6161INCLUDE("netapp/tinet_dhcp4_cli.cfg");
    6262
     
    6565INCLUDE("netapp/resolver_asp.cfg");
    6666INCLUDE("netapp/tinet_resolver.cfg");
     67
     68/* NTPクライアント */
     69#include "ntp_cli.h"
     70//INCLUDE("ntp_cli.cfg");
     71INCLUDE("tinet_ntp_cli.cfg");
     72
     73#include "net_misc.h"
     74INCLUDE("net_misc.cfg");
    6775
    6876/* FatFs */
  • asp3_tinet_ecnl_rx/trunk/app3_human_detec/Debug/Makefile

    r337 r340  
    179179CFLAGS = $(COPTS) $(CDEFS) $(INCLUDES)
    180180
     181APPLDIRS := $(APPLDIRS) ../../ntshell/echonet
    181182APPL_COBJS := echonet.o echonet_agent.o echonet_dbg.o echonet_fbs.o echonet_task.o echonet_udp_task.o echonet_udp6_task.o fbs_string.o
    182 APPL_COBJS := $(APPL_COBJS) ping.o ping6.o resolver.o dhcp4_cli.o netapp_subr.o
     183APPLDIRS := $(APPLDIRS) $(SRCDIR)/$(TINETDIR)/netapp
     184APPL_COBJS := $(APPL_COBJS) ping.o ping6.o resolver.o dhcp4_cli.o netapp_subr.o ntp_cli.o net_misc.o
     185APPLDIRS := $(APPLDIRS) ../../ntshell/tlsf ../../ntshell/fatfs ../../ntshell/ntshell ../../ntshell/ntshell/core ../../ntshell/ntshell/util ../../ntshell/src
    183186APPL_COBJS := $(APPL_COBJS) mbed_api.o netcmd.o fdtable.o io_stub.o socket_stub.o ffarch.o diskio.o ff.o mmc_rspi.o ccsbcs.o ntshell.o text_editor.o text_history.o usrcmd.o vtrecv.o vtsend.o ntlibc.o ntstdio.o ntopt.o syscall.o tlsf.o
    184187
     
    187190#
    188191APPLNAME = app3_human_detec
    189 APPLDIRS = ../src ../../ntshell/tlsf ../../ntshell/fatfs ../../ntshell/echonet ../../ntshell/ntshell ../../ntshell/ntshell/core ../../ntshell/ntshell/util ../../ntshell/src $(SRCDIR)/$(TINETDIR)/netapp
     192APPLDIRS := $(APPLDIRS) ../src
    190193APPL_CFG = main.cfg
    191194APPL_CDL = main.cdl
  • asp3_tinet_ecnl_rx/trunk/app3_human_detec/DebugCitrus/Makefile

    r337 r340  
    179179CFLAGS = $(COPTS) $(CDEFS) $(INCLUDES)
    180180
     181APPLDIRS := $(APPLDIRS) ../../ntshell/echonet
    181182APPL_COBJS := echonet.o echonet_agent.o echonet_dbg.o echonet_fbs.o echonet_task.o echonet_udp_task.o echonet_udp6_task.o fbs_string.o
    182 APPL_COBJS := $(APPL_COBJS) ping.o ping6.o resolver.o dhcp4_cli.o netapp_subr.o
     183APPLDIRS := $(APPLDIRS) $(SRCDIR)/$(TINETDIR)/netapp
     184APPL_COBJS := $(APPL_COBJS) ping.o ping6.o resolver.o dhcp4_cli.o netapp_subr.o ntp_cli.o net_misc.o
     185APPLDIRS := $(APPLDIRS) ../../ntshell/tlsf ../../ntshell/fatfs ../../ntshell/ntshell ../../ntshell/ntshell/core ../../ntshell/ntshell/util ../../ntshell/src
    183186APPL_COBJS := $(APPL_COBJS) mbed_api.o netcmd.o fdtable.o io_stub.o socket_stub.o ffarch.o diskio.o ff.o mmc_rspi.o ccsbcs.o ntshell.o text_editor.o text_history.o usrcmd.o vtrecv.o vtsend.o ntlibc.o ntstdio.o ntopt.o syscall.o tlsf.o
    184187
     
    187190#
    188191APPLNAME = app3_human_detec
    189 APPLDIRS = ../src ../../ntshell/tlsf ../../ntshell/fatfs ../../ntshell/echonet ../../ntshell/ntshell ../../ntshell/ntshell/core ../../ntshell/ntshell/util ../../ntshell/src $(SRCDIR)/$(TINETDIR)/netapp
     192APPLDIRS := $(APPLDIRS) ../src
    190193APPL_CFG = main.cfg
    191194APPL_CDL = main.cdl
  • asp3_tinet_ecnl_rx/trunk/app3_human_detec/DebugEther/Makefile

    r337 r340  
    177177CFLAGS = $(COPTS) $(CDEFS) $(INCLUDES)
    178178
     179APPLDIRS := $(APPLDIRS) ../../ntshell/echonet
    179180APPL_COBJS := echonet.o echonet_agent.o echonet_dbg.o echonet_fbs.o echonet_task.o echonet_udp_task.o echonet_udp6_task.o fbs_string.o
    180 APPL_COBJS := $(APPL_COBJS) ping.o ping6.o resolver.o dhcp4_cli.o netapp_subr.o
     181APPLDIRS := $(APPLDIRS) $(SRCDIR)/$(TINETDIR)/netapp
     182APPL_COBJS := $(APPL_COBJS) ping.o ping6.o resolver.o dhcp4_cli.o netapp_subr.o ntp_cli.o net_misc.o
     183APPLDIRS := $(APPLDIRS) ../../ntshell/tlsf ../../ntshell/fatfs ../../ntshell/ntshell ../../ntshell/ntshell/core ../../ntshell/ntshell/util ../../ntshell/src
    181184APPL_COBJS := $(APPL_COBJS) mbed_api.o netcmd.o fdtable.o io_stub.o socket_stub.o ffarch.o diskio.o ff.o mmc_rspi.o ccsbcs.o ntshell.o text_editor.o text_history.o usrcmd.o vtrecv.o vtsend.o ntlibc.o ntstdio.o ntopt.o syscall.o tlsf.o
    182185
     
    185188#
    186189APPLNAME = app3_human_detec
    187 APPLDIRS = ../src ../../ntshell/tlsf ../../ntshell/fatfs ../../ntshell/echonet ../../ntshell/ntshell ../../ntshell/ntshell/core ../../ntshell/ntshell/util ../../ntshell/src $(SRCDIR)/$(TINETDIR)/netapp
     190APPLDIRS := $(APPLDIRS) ../src
    188191APPL_CFG = main.cfg
    189192APPL_CDL = main.cdl
  • asp3_tinet_ecnl_rx/trunk/app3_human_detec/src/echonet_main.c

    r337 r340  
    5353
    5454/* TODO: メーカーコードを設定 */
    55 #define MAKER_CODE      0x00, 0x00, 0xB3        /* TOPPERSプロジェクト */
     55#define MAKER_CODE      { 0x00, 0x00, 0xB3 }    /* TOPPERSプロジェクト */
    5656
    5757/* ノードプロファイルオブジェクト */
  • asp3_tinet_ecnl_rx/trunk/app3_human_detec/src/main.c

    r337 r340  
    7575#include "ntshell_main.h"
    7676#include <btstack/utils.h>
     77#include "ntp_cli.h"
    7778
    7879ID ws_api_mailboxid = MAIN_DATAQUEUE;
     
    301302        }
    302303
     304        if (link_up && up)
     305                ntp_cli_execute();
     306
    303307        ntshell_change_netif_link(link_up, up);
    304308
     
    308312extern int usrcmd_ping(int argc, char **argv);
    309313extern int usrcmd_dhcp4c(int argc, char **argv);
     314extern int usrcmd_dnsc(int argc, char **argv);
    310315
    311316static const cmd_table_t cmdlist[] = {
     
    317322        {"mkdir", "Make directory", usrcmd_mkdir},
    318323        {"hexdump", "Hex dump", usrcmd_hexdump},
     324        {"date", "print date and time", usrcmd_date},
    319325        {"ping", "ping", usrcmd_ping},
    320326        {"dhcpc", "DHCP Client rel/renew/info", usrcmd_dhcp4c},
     327        {"dnsc", "DNS client", usrcmd_dnsc },
    321328        {"info", "This is a description text string for info command.", usrcmd_info},
    322329        {"exit", "Exit Natural Tiny Shell", usrcmd_exit},
  • asp3_tinet_ecnl_rx/trunk/app3_human_detec/src/main.cfg

    r337 r340  
    5858/* DHCP クライアント */
    5959#include "netapp/dhcp4_cli.h"
    60 INCLUDE("netapp/dhcp4_cli_asp.cfg");
     60//INCLUDE("netapp/dhcp4_cli_asp.cfg");
    6161INCLUDE("netapp/tinet_dhcp4_cli.cfg");
    6262
     
    6565INCLUDE("netapp/resolver_asp.cfg");
    6666INCLUDE("netapp/tinet_resolver.cfg");
     67
     68/* NTPクライアント */
     69#include "ntp_cli.h"
     70//INCLUDE("ntp_cli.cfg");
     71INCLUDE("tinet_ntp_cli.cfg");
     72
     73#include "net_misc.h"
     74INCLUDE("net_misc.cfg");
    6775
    6876/* FatFs */
  • asp3_tinet_ecnl_rx/trunk/app4_aircon/Debug/Makefile

    r337 r340  
    179179CFLAGS = $(COPTS) $(CDEFS) $(INCLUDES)
    180180
     181APPLDIRS := $(APPLDIRS) ../../ntshell/echonet
    181182APPL_COBJS := echonet.o echonet_agent.o echonet_dbg.o echonet_fbs.o echonet_task.o echonet_udp_task.o echonet_udp6_task.o fbs_string.o
    182 APPL_COBJS := $(APPL_COBJS) ping.o ping6.o resolver.o dhcp4_cli.o netapp_subr.o
     183APPLDIRS := $(APPLDIRS) $(SRCDIR)/$(TINETDIR)/netapp
     184APPL_COBJS := $(APPL_COBJS) ping.o ping6.o resolver.o dhcp4_cli.o netapp_subr.o ntp_cli.o net_misc.o
     185APPLDIRS := $(APPLDIRS) ../../ntshell/tlsf ../../ntshell/fatfs ../../ntshell/ntshell ../../ntshell/ntshell/core ../../ntshell/ntshell/util ../../ntshell/src
    183186APPL_COBJS := $(APPL_COBJS) mbed_api.o netcmd.o fdtable.o io_stub.o socket_stub.o ffarch.o diskio.o ff.o mmc_rspi.o ccsbcs.o ntshell.o text_editor.o text_history.o usrcmd.o vtrecv.o vtsend.o ntlibc.o ntstdio.o ntopt.o syscall.o tlsf.o
    184187
     
    187190#
    188191APPLNAME = app4_aircon
    189 APPLDIRS = ../src ../../ntshell/tlsf ../../ntshell/fatfs ../../ntshell/echonet ../../ntshell/ntshell ../../ntshell/ntshell/core ../../ntshell/ntshell/util ../../ntshell/src $(SRCDIR)/$(TINETDIR)/netapp
     192APPLDIRS := $(APPLDIRS) ../src
    190193APPL_CFG = main.cfg
    191194APPL_CDL = main.cdl
  • asp3_tinet_ecnl_rx/trunk/app4_aircon/DebugCitrus/Makefile

    r337 r340  
    179179CFLAGS = $(COPTS) $(CDEFS) $(INCLUDES)
    180180
     181APPLDIRS := $(APPLDIRS) ../../ntshell/echonet
    181182APPL_COBJS := echonet.o echonet_agent.o echonet_dbg.o echonet_fbs.o echonet_task.o echonet_udp_task.o echonet_udp6_task.o fbs_string.o
    182 APPL_COBJS := $(APPL_COBJS) ping.o ping6.o resolver.o dhcp4_cli.o netapp_subr.o
     183APPLDIRS := $(APPLDIRS) $(SRCDIR)/$(TINETDIR)/netapp
     184APPL_COBJS := $(APPL_COBJS) ping.o ping6.o resolver.o dhcp4_cli.o netapp_subr.o ntp_cli.o net_misc.o
     185APPLDIRS := $(APPLDIRS) ../../ntshell/tlsf ../../ntshell/fatfs ../../ntshell/ntshell ../../ntshell/ntshell/core ../../ntshell/ntshell/util ../../ntshell/src
    183186APPL_COBJS := $(APPL_COBJS) mbed_api.o netcmd.o fdtable.o io_stub.o socket_stub.o ffarch.o diskio.o ff.o mmc_rspi.o ccsbcs.o ntshell.o text_editor.o text_history.o usrcmd.o vtrecv.o vtsend.o ntlibc.o ntstdio.o ntopt.o syscall.o tlsf.o
    184187
     
    187190#
    188191APPLNAME = app4_aircon
    189 APPLDIRS = ../src ../../ntshell/tlsf ../../ntshell/fatfs ../../ntshell/echonet ../../ntshell/ntshell ../../ntshell/ntshell/core ../../ntshell/ntshell/util ../../ntshell/src $(SRCDIR)/$(TINETDIR)/netapp
     192APPLDIRS := $(APPLDIRS) ../src
    190193APPL_CFG = main.cfg
    191194APPL_CDL = main.cdl
  • asp3_tinet_ecnl_rx/trunk/app4_aircon/DebugEther/Makefile

    r337 r340  
    177177CFLAGS = $(COPTS) $(CDEFS) $(INCLUDES)
    178178
     179APPLDIRS := $(APPLDIRS) ../../ntshell/echonet
    179180APPL_COBJS := echonet.o echonet_agent.o echonet_dbg.o echonet_fbs.o echonet_task.o echonet_udp_task.o echonet_udp6_task.o fbs_string.o
    180 APPL_COBJS := $(APPL_COBJS) ping.o ping6.o resolver.o dhcp4_cli.o netapp_subr.o
     181APPLDIRS := $(APPLDIRS) $(SRCDIR)/$(TINETDIR)/netapp
     182APPL_COBJS := $(APPL_COBJS) ping.o ping6.o resolver.o dhcp4_cli.o netapp_subr.o ntp_cli.o net_misc.o
     183APPLDIRS := $(APPLDIRS) ../../ntshell/tlsf ../../ntshell/fatfs ../../ntshell/ntshell ../../ntshell/ntshell/core ../../ntshell/ntshell/util ../../ntshell/src
    181184APPL_COBJS := $(APPL_COBJS) mbed_api.o netcmd.o fdtable.o io_stub.o socket_stub.o ffarch.o diskio.o ff.o mmc_rspi.o ccsbcs.o ntshell.o text_editor.o text_history.o usrcmd.o vtrecv.o vtsend.o ntlibc.o ntstdio.o ntopt.o syscall.o tlsf.o
    182185
     
    185188#
    186189APPLNAME = app4_aircon
    187 APPLDIRS = ../src ../../ntshell/tlsf ../../ntshell/fatfs ../../ntshell/echonet ../../ntshell/ntshell ../../ntshell/ntshell/core ../../ntshell/ntshell/util ../../ntshell/src $(SRCDIR)/$(TINETDIR)/netapp
     190APPLDIRS := $(APPLDIRS) ../src
    188191APPL_CFG = main.cfg
    189192APPL_CDL = main.cdl
  • asp3_tinet_ecnl_rx/trunk/app4_aircon/src/echonet_main.c

    r337 r340  
    5353
    5454/* TODO: メーカーコードを設定 */
    55 #define MAKER_CODE      0x00, 0x00, 0xB3        /* TOPPERSプロジェクト */
     55#define MAKER_CODE      { 0x00, 0x00, 0xB3 }    /* TOPPERSプロジェクト */
    5656
    5757/* ノードプロファイルオブジェクト */
  • asp3_tinet_ecnl_rx/trunk/app4_aircon/src/main.c

    r337 r340  
    7575#include "ntshell_main.h"
    7676#include <btstack/utils.h>
     77#include "ntp_cli.h"
    7778
    7879ID ws_api_mailboxid = MAIN_DATAQUEUE;
     
    301302        }
    302303
     304        if (link_up && up)
     305                ntp_cli_execute();
     306
    303307        ntshell_change_netif_link(link_up, up);
    304308
     
    308312extern int usrcmd_ping(int argc, char **argv);
    309313extern int usrcmd_dhcp4c(int argc, char **argv);
     314extern int usrcmd_dnsc(int argc, char **argv);
    310315
    311316static const cmd_table_t cmdlist[] = {
     
    317322        {"mkdir", "Make directory", usrcmd_mkdir},
    318323        {"hexdump", "Hex dump", usrcmd_hexdump},
     324        {"date", "print date and time", usrcmd_date},
    319325        {"ping", "ping", usrcmd_ping},
    320326        {"dhcpc", "DHCP Client rel/renew/info", usrcmd_dhcp4c},
     327        {"dnsc", "DNS client", usrcmd_dnsc },
    321328        {"info", "This is a description text string for info command.", usrcmd_info},
    322329        {"exit", "Exit Natural Tiny Shell", usrcmd_exit},
  • asp3_tinet_ecnl_rx/trunk/app4_aircon/src/main.cfg

    r337 r340  
    5858/* DHCP クライアント */
    5959#include "netapp/dhcp4_cli.h"
    60 INCLUDE("netapp/dhcp4_cli_asp.cfg");
     60//INCLUDE("netapp/dhcp4_cli_asp.cfg");
    6161INCLUDE("netapp/tinet_dhcp4_cli.cfg");
    6262
     
    6565INCLUDE("netapp/resolver_asp.cfg");
    6666INCLUDE("netapp/tinet_resolver.cfg");
     67
     68/* NTPクライアント */
     69#include "ntp_cli.h"
     70//INCLUDE("ntp_cli.cfg");
     71INCLUDE("tinet_ntp_cli.cfg");
     72
     73#include "net_misc.h"
     74INCLUDE("net_misc.cfg");
    6775
    6876/* FatFs */
  • asp3_tinet_ecnl_rx/trunk/app5_temp_sensor/Debug/Makefile

    r337 r340  
    179179CFLAGS = $(COPTS) $(CDEFS) $(INCLUDES)
    180180
     181APPLDIRS := $(APPLDIRS) ../../ntshell/echonet
    181182APPL_COBJS := echonet.o echonet_agent.o echonet_dbg.o echonet_fbs.o echonet_task.o echonet_udp_task.o echonet_udp6_task.o fbs_string.o
    182 APPL_COBJS := $(APPL_COBJS) ping.o ping6.o resolver.o dhcp4_cli.o netapp_subr.o
     183APPLDIRS := $(APPLDIRS) $(SRCDIR)/$(TINETDIR)/netapp
     184APPL_COBJS := $(APPL_COBJS) ping.o ping6.o resolver.o dhcp4_cli.o netapp_subr.o ntp_cli.o net_misc.o
     185APPLDIRS := $(APPLDIRS) ../../ntshell/tlsf ../../ntshell/fatfs ../../ntshell/ntshell ../../ntshell/ntshell/core ../../ntshell/ntshell/util ../../ntshell/src
    183186APPL_COBJS := $(APPL_COBJS) mbed_api.o netcmd.o fdtable.o io_stub.o socket_stub.o ffarch.o diskio.o ff.o mmc_rspi.o ccsbcs.o ntshell.o text_editor.o text_history.o usrcmd.o vtrecv.o vtsend.o ntlibc.o ntstdio.o ntopt.o syscall.o tlsf.o
    184187
     
    187190#
    188191APPLNAME = app5_temp_sensor
    189 APPLDIRS = ../src ../../ntshell/tlsf ../../ntshell/fatfs ../../ntshell/echonet ../../ntshell/ntshell ../../ntshell/ntshell/core ../../ntshell/ntshell/util ../../ntshell/src $(SRCDIR)/$(TINETDIR)/netapp
     192APPLDIRS := $(APPLDIRS) ../src
    190193APPL_CFG = main.cfg
    191194APPL_CDL = main.cdl
  • asp3_tinet_ecnl_rx/trunk/app5_temp_sensor/DebugCitrus/Makefile

    r337 r340  
    179179CFLAGS = $(COPTS) $(CDEFS) $(INCLUDES)
    180180
     181APPLDIRS := $(APPLDIRS) ../../ntshell/echonet
    181182APPL_COBJS := echonet.o echonet_agent.o echonet_dbg.o echonet_fbs.o echonet_task.o echonet_udp_task.o echonet_udp6_task.o fbs_string.o
    182 APPL_COBJS := $(APPL_COBJS) ping.o ping6.o resolver.o dhcp4_cli.o netapp_subr.o
     183APPLDIRS := $(APPLDIRS) $(SRCDIR)/$(TINETDIR)/netapp
     184APPL_COBJS := $(APPL_COBJS) ping.o ping6.o resolver.o dhcp4_cli.o netapp_subr.o ntp_cli.o net_misc.o
     185APPLDIRS := $(APPLDIRS) ../../ntshell/tlsf ../../ntshell/fatfs ../../ntshell/ntshell ../../ntshell/ntshell/core ../../ntshell/ntshell/util ../../ntshell/src
    183186APPL_COBJS := $(APPL_COBJS) mbed_api.o netcmd.o fdtable.o io_stub.o socket_stub.o ffarch.o diskio.o ff.o mmc_rspi.o ccsbcs.o ntshell.o text_editor.o text_history.o usrcmd.o vtrecv.o vtsend.o ntlibc.o ntstdio.o ntopt.o syscall.o tlsf.o
    184187
     
    187190#
    188191APPLNAME = app5_temp_sensor
    189 APPLDIRS = ../src ../../ntshell/tlsf ../../ntshell/fatfs ../../ntshell/echonet ../../ntshell/ntshell ../../ntshell/ntshell/core ../../ntshell/ntshell/util ../../ntshell/src $(SRCDIR)/$(TINETDIR)/netapp
     192APPLDIRS := $(APPLDIRS) ../src
    190193APPL_CFG = main.cfg
    191194APPL_CDL = main.cdl
  • asp3_tinet_ecnl_rx/trunk/app5_temp_sensor/DebugEther/Makefile

    r337 r340  
    177177CFLAGS = $(COPTS) $(CDEFS) $(INCLUDES)
    178178
     179APPLDIRS := $(APPLDIRS) ../../ntshell/echonet
    179180APPL_COBJS := echonet.o echonet_agent.o echonet_dbg.o echonet_fbs.o echonet_task.o echonet_udp_task.o echonet_udp6_task.o fbs_string.o
    180 APPL_COBJS := $(APPL_COBJS) ping.o ping6.o resolver.o dhcp4_cli.o netapp_subr.o
     181APPLDIRS := $(APPLDIRS) $(SRCDIR)/$(TINETDIR)/netapp
     182APPL_COBJS := $(APPL_COBJS) ping.o ping6.o resolver.o dhcp4_cli.o netapp_subr.o ntp_cli.o net_misc.o
     183APPLDIRS := $(APPLDIRS) ../../ntshell/tlsf ../../ntshell/fatfs ../../ntshell/ntshell ../../ntshell/ntshell/core ../../ntshell/ntshell/util ../../ntshell/src
    181184APPL_COBJS := $(APPL_COBJS) mbed_api.o netcmd.o fdtable.o io_stub.o socket_stub.o ffarch.o diskio.o ff.o mmc_rspi.o ccsbcs.o ntshell.o text_editor.o text_history.o usrcmd.o vtrecv.o vtsend.o ntlibc.o ntstdio.o ntopt.o syscall.o tlsf.o
    182185
     
    185188#
    186189APPLNAME = app5_temp_sensor
    187 APPLDIRS = ../src ../../ntshell/tlsf ../../ntshell/fatfs ../../ntshell/echonet ../../ntshell/ntshell ../../ntshell/ntshell/core ../../ntshell/ntshell/util ../../ntshell/src $(SRCDIR)/$(TINETDIR)/netapp
     190APPLDIRS := $(APPLDIRS) ../src
    188191APPL_CFG = main.cfg
    189192APPL_CDL = main.cdl
  • asp3_tinet_ecnl_rx/trunk/app5_temp_sensor/src/echonet_main.c

    r337 r340  
    5353
    5454/* TODO: メーカーコードを設定 */
    55 #define MAKER_CODE      0x00, 0x00, 0xB3        /* TOPPERSプロジェクト */
     55#define MAKER_CODE      { 0x00, 0x00, 0xB3 }    /* TOPPERSプロジェクト */
    5656
    5757/* ノードプロファイルオブジェクト */
  • asp3_tinet_ecnl_rx/trunk/app5_temp_sensor/src/main.c

    r337 r340  
    7575#include "ntshell_main.h"
    7676#include <btstack/utils.h>
     77#include "ntp_cli.h"
    7778
    7879ID ws_api_mailboxid = MAIN_DATAQUEUE;
     
    301302        }
    302303
     304        if (link_up && up)
     305                ntp_cli_execute();
     306
    303307        ntshell_change_netif_link(link_up, up);
    304308
     
    308312extern int usrcmd_ping(int argc, char **argv);
    309313extern int usrcmd_dhcp4c(int argc, char **argv);
     314extern int usrcmd_dnsc(int argc, char **argv);
    310315
    311316static const cmd_table_t cmdlist[] = {
     
    317322        {"mkdir", "Make directory", usrcmd_mkdir},
    318323        {"hexdump", "Hex dump", usrcmd_hexdump},
     324        {"date", "print date and time", usrcmd_date},
    319325        {"ping", "ping", usrcmd_ping},
    320326        {"dhcpc", "DHCP Client rel/renew/info", usrcmd_dhcp4c},
     327        {"dnsc", "DNS client", usrcmd_dnsc },
    321328        {"info", "This is a description text string for info command.", usrcmd_info},
    322329        {"exit", "Exit Natural Tiny Shell", usrcmd_exit},
  • asp3_tinet_ecnl_rx/trunk/app5_temp_sensor/src/main.cfg

    r337 r340  
    5858/* DHCP クライアント */
    5959#include "netapp/dhcp4_cli.h"
    60 INCLUDE("netapp/dhcp4_cli_asp.cfg");
     60//INCLUDE("netapp/dhcp4_cli_asp.cfg");
    6161INCLUDE("netapp/tinet_dhcp4_cli.cfg");
    6262
     
    6565INCLUDE("netapp/resolver_asp.cfg");
    6666INCLUDE("netapp/tinet_resolver.cfg");
     67
     68/* NTPクライアント */
     69#include "ntp_cli.h"
     70//INCLUDE("ntp_cli.cfg");
     71INCLUDE("tinet_ntp_cli.cfg");
     72
     73#include "net_misc.h"
     74INCLUDE("net_misc.cfg");
    6775
    6876/* FatFs */
  • asp3_tinet_ecnl_rx/trunk/app6_hot_water_pot/Debug/Makefile

    r337 r340  
    179179CFLAGS = $(COPTS) $(CDEFS) $(INCLUDES)
    180180
     181APPLDIRS := $(APPLDIRS) ../../ntshell/echonet
    181182APPL_COBJS := echonet.o echonet_agent.o echonet_dbg.o echonet_fbs.o echonet_task.o echonet_udp_task.o echonet_udp6_task.o fbs_string.o
    182 APPL_COBJS := $(APPL_COBJS) ping.o ping6.o resolver.o dhcp4_cli.o netapp_subr.o
     183APPLDIRS := $(APPLDIRS) $(SRCDIR)/$(TINETDIR)/netapp
     184APPL_COBJS := $(APPL_COBJS) ping.o ping6.o resolver.o dhcp4_cli.o netapp_subr.o ntp_cli.o net_misc.o
     185APPLDIRS := $(APPLDIRS) ../../ntshell/tlsf ../../ntshell/fatfs ../../ntshell/ntshell ../../ntshell/ntshell/core ../../ntshell/ntshell/util ../../ntshell/src
    183186APPL_COBJS := $(APPL_COBJS) mbed_api.o netcmd.o fdtable.o io_stub.o socket_stub.o ffarch.o diskio.o ff.o mmc_rspi.o ccsbcs.o ntshell.o text_editor.o text_history.o usrcmd.o vtrecv.o vtsend.o ntlibc.o ntstdio.o ntopt.o syscall.o tlsf.o
    184187
     
    187190#
    188191APPLNAME = app6_hot_water_pot
    189 APPLDIRS = ../src ../../ntshell/tlsf ../../ntshell/fatfs ../../ntshell/echonet ../../ntshell/ntshell ../../ntshell/ntshell/core ../../ntshell/ntshell/util ../../ntshell/src $(SRCDIR)/$(TINETDIR)/netapp
     192APPLDIRS := $(APPLDIRS) ../src
    190193APPL_CFG = main.cfg
    191194APPL_CDL = main.cdl
  • asp3_tinet_ecnl_rx/trunk/app6_hot_water_pot/DebugCitrus/Makefile

    r337 r340  
    179179CFLAGS = $(COPTS) $(CDEFS) $(INCLUDES)
    180180
     181APPLDIRS := $(APPLDIRS) ../../ntshell/echonet
    181182APPL_COBJS := echonet.o echonet_agent.o echonet_dbg.o echonet_fbs.o echonet_task.o echonet_udp_task.o echonet_udp6_task.o fbs_string.o
    182 APPL_COBJS := $(APPL_COBJS) ping.o ping6.o resolver.o dhcp4_cli.o netapp_subr.o
     183APPLDIRS := $(APPLDIRS) $(SRCDIR)/$(TINETDIR)/netapp
     184APPL_COBJS := $(APPL_COBJS) ping.o ping6.o resolver.o dhcp4_cli.o netapp_subr.o ntp_cli.o net_misc.o
     185APPLDIRS := $(APPLDIRS) ../../ntshell/tlsf ../../ntshell/fatfs ../../ntshell/ntshell ../../ntshell/ntshell/core ../../ntshell/ntshell/util ../../ntshell/src
    183186APPL_COBJS := $(APPL_COBJS) mbed_api.o netcmd.o fdtable.o io_stub.o socket_stub.o ffarch.o diskio.o ff.o mmc_rspi.o ccsbcs.o ntshell.o text_editor.o text_history.o usrcmd.o vtrecv.o vtsend.o ntlibc.o ntstdio.o ntopt.o syscall.o tlsf.o
    184187
     
    187190#
    188191APPLNAME = app6_hot_water_pot
    189 APPLDIRS = ../src ../../ntshell/tlsf ../../ntshell/fatfs ../../ntshell/echonet ../../ntshell/ntshell ../../ntshell/ntshell/core ../../ntshell/ntshell/util ../../ntshell/src $(SRCDIR)/$(TINETDIR)/netapp
     192APPLDIRS := $(APPLDIRS) ../src
    190193APPL_CFG = main.cfg
    191194APPL_CDL = main.cdl
  • asp3_tinet_ecnl_rx/trunk/app6_hot_water_pot/DebugEther/Makefile

    r337 r340  
    177177CFLAGS = $(COPTS) $(CDEFS) $(INCLUDES)
    178178
     179APPLDIRS := $(APPLDIRS) ../../ntshell/echonet
    179180APPL_COBJS := echonet.o echonet_agent.o echonet_dbg.o echonet_fbs.o echonet_task.o echonet_udp_task.o echonet_udp6_task.o fbs_string.o
    180 APPL_COBJS := $(APPL_COBJS) ping.o ping6.o resolver.o dhcp4_cli.o netapp_subr.o
     181APPLDIRS := $(APPLDIRS) $(SRCDIR)/$(TINETDIR)/netapp
     182APPL_COBJS := $(APPL_COBJS) ping.o ping6.o resolver.o dhcp4_cli.o netapp_subr.o ntp_cli.o net_misc.o
     183APPLDIRS := $(APPLDIRS) ../../ntshell/tlsf ../../ntshell/fatfs ../../ntshell/ntshell ../../ntshell/ntshell/core ../../ntshell/ntshell/util ../../ntshell/src
    181184APPL_COBJS := $(APPL_COBJS) mbed_api.o netcmd.o fdtable.o io_stub.o socket_stub.o ffarch.o diskio.o ff.o mmc_rspi.o ccsbcs.o ntshell.o text_editor.o text_history.o usrcmd.o vtrecv.o vtsend.o ntlibc.o ntstdio.o ntopt.o syscall.o tlsf.o
    182185
     
    185188#
    186189APPLNAME = app6_hot_water_pot
    187 APPLDIRS = ../src ../../ntshell/tlsf ../../ntshell/fatfs ../../ntshell/echonet ../../ntshell/ntshell ../../ntshell/ntshell/core ../../ntshell/ntshell/util ../../ntshell/src $(SRCDIR)/$(TINETDIR)/netapp
     190APPLDIRS := $(APPLDIRS) ../src
    188191APPL_CFG = main.cfg
    189192APPL_CDL = main.cdl
  • asp3_tinet_ecnl_rx/trunk/app6_hot_water_pot/src/echonet_main.c

    r337 r340  
    5353
    5454/* TODO: メーカーコードを設定 */
    55 #define MAKER_CODE      0x00, 0x00, 0xB3        /* TOPPERSプロジェクト */
     55#define MAKER_CODE      { 0x00, 0x00, 0xB3 }    /* TOPPERSプロジェクト */
    5656
    5757/* ノードプロファイルオブジェクト */
  • asp3_tinet_ecnl_rx/trunk/app6_hot_water_pot/src/main.c

    r337 r340  
    7575#include "ntshell_main.h"
    7676#include <btstack/utils.h>
     77#include "ntp_cli.h"
    7778
    7879ID ws_api_mailboxid = MAIN_DATAQUEUE;
     
    301302        }
    302303
     304        if (link_up && up)
     305                ntp_cli_execute();
     306
    303307        ntshell_change_netif_link(link_up, up);
    304308
     
    308312extern int usrcmd_ping(int argc, char **argv);
    309313extern int usrcmd_dhcp4c(int argc, char **argv);
     314extern int usrcmd_dnsc(int argc, char **argv);
    310315
    311316static const cmd_table_t cmdlist[] = {
     
    317322        {"mkdir", "Make directory", usrcmd_mkdir},
    318323        {"hexdump", "Hex dump", usrcmd_hexdump},
     324        {"date", "print date and time", usrcmd_date},
    319325        {"ping", "ping", usrcmd_ping},
    320326        {"dhcpc", "DHCP Client rel/renew/info", usrcmd_dhcp4c},
     327        {"dnsc", "DNS client", usrcmd_dnsc },
    321328        {"info", "This is a description text string for info command.", usrcmd_info},
    322329        {"exit", "Exit Natural Tiny Shell", usrcmd_exit},
  • asp3_tinet_ecnl_rx/trunk/app6_hot_water_pot/src/main.cfg

    r337 r340  
    5858/* DHCP クライアント */
    5959#include "netapp/dhcp4_cli.h"
    60 INCLUDE("netapp/dhcp4_cli_asp.cfg");
     60//INCLUDE("netapp/dhcp4_cli_asp.cfg");
    6161INCLUDE("netapp/tinet_dhcp4_cli.cfg");
    6262
     
    6565INCLUDE("netapp/resolver_asp.cfg");
    6666INCLUDE("netapp/tinet_resolver.cfg");
     67
     68/* NTPクライアント */
     69#include "ntp_cli.h"
     70//INCLUDE("ntp_cli.cfg");
     71INCLUDE("tinet_ntp_cli.cfg");
     72
     73#include "net_misc.h"
     74INCLUDE("net_misc.cfg");
    6775
    6876/* FatFs */
  • asp3_tinet_ecnl_rx/trunk/app7_buzzer/Debug/Makefile

    r337 r340  
    179179CFLAGS = $(COPTS) $(CDEFS) $(INCLUDES)
    180180
     181APPLDIRS := $(APPLDIRS) ../../ntshell/echonet
    181182APPL_COBJS := echonet.o echonet_agent.o echonet_dbg.o echonet_fbs.o echonet_task.o echonet_udp_task.o echonet_udp6_task.o fbs_string.o
    182 APPL_COBJS := $(APPL_COBJS) ping.o ping6.o resolver.o dhcp4_cli.o netapp_subr.o
     183APPLDIRS := $(APPLDIRS) $(SRCDIR)/$(TINETDIR)/netapp
     184APPL_COBJS := $(APPL_COBJS) ping.o ping6.o resolver.o dhcp4_cli.o netapp_subr.o ntp_cli.o net_misc.o
     185APPLDIRS := $(APPLDIRS) ../../ntshell/tlsf ../../ntshell/fatfs ../../ntshell/ntshell ../../ntshell/ntshell/core ../../ntshell/ntshell/util ../../ntshell/src
    183186APPL_COBJS := $(APPL_COBJS) mbed_api.o netcmd.o fdtable.o io_stub.o socket_stub.o ffarch.o diskio.o ff.o mmc_rspi.o ccsbcs.o ntshell.o text_editor.o text_history.o usrcmd.o vtrecv.o vtsend.o ntlibc.o ntstdio.o ntopt.o syscall.o tlsf.o
    184187
     
    187190#
    188191APPLNAME = app7_buzzer
    189 APPLDIRS = ../src ../../ntshell/tlsf ../../ntshell/fatfs ../../ntshell/echonet ../../ntshell/ntshell ../../ntshell/ntshell/core ../../ntshell/ntshell/util ../../ntshell/src $(SRCDIR)/$(TINETDIR)/netapp
     192APPLDIRS := $(APPLDIRS) ../src
    190193APPL_CFG = main.cfg
    191194APPL_CDL = main.cdl
  • asp3_tinet_ecnl_rx/trunk/app7_buzzer/DebugCitrus/Makefile

    r337 r340  
    179179CFLAGS = $(COPTS) $(CDEFS) $(INCLUDES)
    180180
     181APPLDIRS := $(APPLDIRS) ../../ntshell/echonet
    181182APPL_COBJS := echonet.o echonet_agent.o echonet_dbg.o echonet_fbs.o echonet_task.o echonet_udp_task.o echonet_udp6_task.o fbs_string.o
    182 APPL_COBJS := $(APPL_COBJS) ping.o ping6.o resolver.o dhcp4_cli.o netapp_subr.o
     183APPLDIRS := $(APPLDIRS) $(SRCDIR)/$(TINETDIR)/netapp
     184APPL_COBJS := $(APPL_COBJS) ping.o ping6.o resolver.o dhcp4_cli.o netapp_subr.o ntp_cli.o net_misc.o
     185APPLDIRS := $(APPLDIRS) ../../ntshell/tlsf ../../ntshell/fatfs ../../ntshell/ntshell ../../ntshell/ntshell/core ../../ntshell/ntshell/util ../../ntshell/src
    183186APPL_COBJS := $(APPL_COBJS) mbed_api.o netcmd.o fdtable.o io_stub.o socket_stub.o ffarch.o diskio.o ff.o mmc_rspi.o ccsbcs.o ntshell.o text_editor.o text_history.o usrcmd.o vtrecv.o vtsend.o ntlibc.o ntstdio.o ntopt.o syscall.o tlsf.o
    184187
     
    187190#
    188191APPLNAME = app7_buzzer
    189 APPLDIRS = ../src ../../ntshell/tlsf ../../ntshell/fatfs ../../ntshell/echonet ../../ntshell/ntshell ../../ntshell/ntshell/core ../../ntshell/ntshell/util ../../ntshell/src $(SRCDIR)/$(TINETDIR)/netapp
     192APPLDIRS := $(APPLDIRS) ../src
    190193APPL_CFG = main.cfg
    191194APPL_CDL = main.cdl
  • asp3_tinet_ecnl_rx/trunk/app7_buzzer/DebugEther/Makefile

    r337 r340  
    177177CFLAGS = $(COPTS) $(CDEFS) $(INCLUDES)
    178178
     179APPLDIRS := $(APPLDIRS) ../../ntshell/echonet
    179180APPL_COBJS := echonet.o echonet_agent.o echonet_dbg.o echonet_fbs.o echonet_task.o echonet_udp_task.o echonet_udp6_task.o fbs_string.o
    180 APPL_COBJS := $(APPL_COBJS) ping.o ping6.o resolver.o dhcp4_cli.o netapp_subr.o
     181APPLDIRS := $(APPLDIRS) $(SRCDIR)/$(TINETDIR)/netapp
     182APPL_COBJS := $(APPL_COBJS) ping.o ping6.o resolver.o dhcp4_cli.o netapp_subr.o ntp_cli.o net_misc.o
     183APPLDIRS := $(APPLDIRS) ../../ntshell/tlsf ../../ntshell/fatfs ../../ntshell/ntshell ../../ntshell/ntshell/core ../../ntshell/ntshell/util ../../ntshell/src
    181184APPL_COBJS := $(APPL_COBJS) mbed_api.o netcmd.o fdtable.o io_stub.o socket_stub.o ffarch.o diskio.o ff.o mmc_rspi.o ccsbcs.o ntshell.o text_editor.o text_history.o usrcmd.o vtrecv.o vtsend.o ntlibc.o ntstdio.o ntopt.o syscall.o tlsf.o
    182185
     
    185188#
    186189APPLNAME = app7_buzzer
    187 APPLDIRS = ../src ../../ntshell/tlsf ../../ntshell/fatfs ../../ntshell/echonet ../../ntshell/ntshell ../../ntshell/ntshell/core ../../ntshell/ntshell/util ../../ntshell/src $(SRCDIR)/$(TINETDIR)/netapp
     190APPLDIRS := $(APPLDIRS) ../src
    188191APPL_CFG = main.cfg
    189192APPL_CDL = main.cdl
  • asp3_tinet_ecnl_rx/trunk/app7_buzzer/src/echonet_main.c

    r337 r340  
    5353
    5454/* TODO: メーカーコードを設定 */
    55 #define MAKER_CODE      0x00, 0x00, 0xB3        /* TOPPERSプロジェクト */
     55#define MAKER_CODE      { 0x00, 0x00, 0xB3 }    /* TOPPERSプロジェクト */
    5656
    5757/* ノードプロファイルオブジェクト */
  • asp3_tinet_ecnl_rx/trunk/app7_buzzer/src/main.c

    r337 r340  
    7575#include "ntshell_main.h"
    7676#include <btstack/utils.h>
     77#include "ntp_cli.h"
    7778
    7879ID ws_api_mailboxid = MAIN_DATAQUEUE;
     
    301302        }
    302303
     304        if (link_up && up)
     305                ntp_cli_execute();
     306
    303307        ntshell_change_netif_link(link_up, up);
    304308
     
    308312extern int usrcmd_ping(int argc, char **argv);
    309313extern int usrcmd_dhcp4c(int argc, char **argv);
     314extern int usrcmd_dnsc(int argc, char **argv);
    310315
    311316static const cmd_table_t cmdlist[] = {
     
    317322        {"mkdir", "Make directory", usrcmd_mkdir},
    318323        {"hexdump", "Hex dump", usrcmd_hexdump},
     324        {"date", "print date and time", usrcmd_date},
    319325        {"ping", "ping", usrcmd_ping},
    320326        {"dhcpc", "DHCP Client rel/renew/info", usrcmd_dhcp4c},
     327        {"dnsc", "DNS client", usrcmd_dnsc },
    321328        {"info", "This is a description text string for info command.", usrcmd_info},
    322329        {"exit", "Exit Natural Tiny Shell", usrcmd_exit},
  • asp3_tinet_ecnl_rx/trunk/app7_buzzer/src/main.cfg

    r337 r340  
    5858/* DHCP クライアント */
    5959#include "netapp/dhcp4_cli.h"
    60 INCLUDE("netapp/dhcp4_cli_asp.cfg");
     60//INCLUDE("netapp/dhcp4_cli_asp.cfg");
    6161INCLUDE("netapp/tinet_dhcp4_cli.cfg");
    6262
     
    6565INCLUDE("netapp/resolver_asp.cfg");
    6666INCLUDE("netapp/tinet_resolver.cfg");
     67
     68/* NTPクライアント */
     69#include "ntp_cli.h"
     70//INCLUDE("ntp_cli.cfg");
     71INCLUDE("tinet_ntp_cli.cfg");
     72
     73#include "net_misc.h"
     74INCLUDE("net_misc.cfg");
    6775
    6876/* FatFs */
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/tinet/netapp/dhcp4_cli.c

    r337 r340  
    191191#endif
    192192
     193#ifdef SEM_DHCP4_CLI_TIMER
     194#define DHCP4_CLI_TIMER_LOCK() do { syscall(wai_sem(SEM_DHCP4_CLI_TIMER)); } while(0)
     195#define DHCP4_CLI_TIMER_UNLOCK() do { syscall(sig_sem(SEM_DHCP4_CLI_TIMER)); } while(0)
     196#else
     197#define DHCP4_CLI_TIMER_LOCK() do { } while(0)
     198#define DHCP4_CLI_TIMER_UNLOCK() do { } while(0)
     199#endif
     200
     201#ifdef SEM_DHCP4_CLI_READY
     202#define DHCP4_CLI_READY_WAIT(ct) do { syscall(wai_sem(SEM_DHCP4_CLI_READY)); } while(0)
     203#define DHCP4_CLI_READY_SIGNAL(ct) do { syscall(sig_sem(SEM_DHCP4_CLI_READY)); } while(0)
     204#else
     205#define DHCP4_CLI_READY_WAIT(ct) do { } while(0)
     206#define DHCP4_CLI_READY_SIGNAL(ct) do { syscall(wup_tsk(ct->tskid)); } while(0)
     207#endif
     208
    193209/*
    194210 *  dhcp4_cksum -- チェックサムの計算関数
     
    919935        int ix;
    920936
    921         syscall(wai_sem(SEM_DHCP4_CLI_TIMER));
     937        DHCP4_CLI_TIMER_LOCK();
    922938        for (ix = NUM_DHCP4C_TIMERS; ix -- > 0; )
    923939                ct->timers[ix] = 0;
    924         syscall(sig_sem(SEM_DHCP4_CLI_TIMER));
     940        DHCP4_CLI_TIMER_UNLOCK();
    925941        }
    926942
     
    937953
    938954        /* OFFER メッセージ受信タイムアウトを設定する。*/
    939         syscall(wai_sem(SEM_DHCP4_CLI_TIMER));
     955        DHCP4_CLI_TIMER_LOCK();
    940956        ct->timers[DHCP4C_TIMER_RCV_OFFER] = SYSTIM2TIMER(TMO_DHCP4C_OFFER);
    941         syscall(sig_sem(SEM_DHCP4_CLI_TIMER));
     957        DHCP4_CLI_TIMER_UNLOCK();
    942958
    943959        /* 送信先アドレスにローカルネットワークへのブロードキャストを設定する。*/
     
    952968        /* DISCOVER メッセージを送信する。*/
    953969        ct->flags |= DHCP4C_FLAG_TMOUT_SND_DISC;
    954         syscall(sig_sem(SEM_DHCP4_CLI_READY));
     970        DHCP4_CLI_READY_SIGNAL(ct);
    955971        }
    956972
     
    979995
    980996        /* EXPIRE、RENEW、REBIND タイマーを設定する。*/
    981         syscall(wai_sem(SEM_DHCP4_CLI_TIMER));
     997        DHCP4_CLI_TIMER_LOCK();
    982998        ct->timers[DHCP4C_TIMER_EXPIRE] = SYSTIM2TIMER(ct->expire);             /* EXPIRE      までの時間 */
    983999        ct->timers[DHCP4C_TIMER_REBIND] = SYSTIM2TIMER(ct->rebind);             /* REBIND(T2)までの時間 */
    9841000        ct->timers[DHCP4C_TIMER_RENEW]  = SYSTIM2TIMER(ct->renew);              /* RENEW (T1)までの時間 */
    985         syscall(sig_sem(SEM_DHCP4_CLI_TIMER));
     1001        DHCP4_CLI_TIMER_UNLOCK();
    9861002
    9871003        /* BOUND 状態に遷移する。*/
     
    10061022        /* 遷移する状態が RENEW 以外では ACK/NAK メッセージ受信タイムアウトを設定する。*/
    10071023        if (fsm != DHCP4_FSM_RENEW) {
    1008                 syscall(wai_sem(SEM_DHCP4_CLI_TIMER));
     1024                DHCP4_CLI_TIMER_LOCK();
    10091025                ct->timers[DHCP4C_TIMER_RCV_ACK] = SYSTIM2TIMER(TMO_DHCP4C_ACK);
    1010                 syscall(sig_sem(SEM_DHCP4_CLI_TIMER));
     1026                DHCP4_CLI_TIMER_UNLOCK();
    10111027                }
    10121028
     
    10291045        /* REQUEST メッセージを送信する。*/
    10301046        ct->flags |= DHCP4C_FLAG_TMOUT_SND_REQ;
    1031         syscall(sig_sem(SEM_DHCP4_CLI_READY));
     1047        DHCP4_CLI_READY_SIGNAL(ct);
    10321048        }
    10331049
     
    10551071        /* RELEASE メッセージを送信する。*/
    10561072        ct->flags |= DHCP4C_FLAG_TMOUT_SND_REL;
    1057         syscall(sig_sem(SEM_DHCP4_CLI_READY));
     1073        DHCP4_CLI_READY_SIGNAL(ct);
    10581074        }
    10591075
     
    13491365
    13501366                /* REQUEST メッセージ送信タイマーを停止する。*/
    1351                 syscall(wai_sem(SEM_DHCP4_CLI_TIMER));
     1367                DHCP4_CLI_TIMER_LOCK();
    13521368                ct->timers[DHCP4C_TIMER_SND_REQ] = 0;
    1353                 syscall(sig_sem(SEM_DHCP4_CLI_TIMER));
     1369                DHCP4_CLI_TIMER_UNLOCK();
    13541370
    13551371                /*
     
    13991415
    14001416                /* ACK/NAK メッセージ受信タイマーを停止する。*/
    1401                 syscall(wai_sem(SEM_DHCP4_CLI_TIMER));
     1417                DHCP4_CLI_TIMER_LOCK();
    14021418                ct->timers[DHCP4C_TIMER_RCV_ACK] = 0;
    1403                 syscall(sig_sem(SEM_DHCP4_CLI_TIMER));
     1419                DHCP4_CLI_TIMER_UNLOCK();
    14041420
    14051421                /*
     
    14751491
    14761492        /* 再送信タイムアウトを設定する。*/
    1477         syscall(wai_sem(SEM_DHCP4_CLI_TIMER));
     1493        DHCP4_CLI_TIMER_LOCK();
    14781494        ct->timers[DHCP4C_TIMER_SND_REQ] = SYSTIM2TIMER(ct->interval);
    1479         syscall(sig_sem(SEM_DHCP4_CLI_TIMER));
     1495        DHCP4_CLI_TIMER_UNLOCK();
    14801496        }
    14811497
     
    15111527
    15121528        /* メッセージ送信待ちを行う。*/
    1513         syscall(wai_sem(SEM_DHCP4_CLI_READY));
     1529        DHCP4_CLI_READY_WAIT(ct);
    15141530
    15151531        /* SLEEP 状態に遷移する。*/
     
    15291545
    15301546                /* DISCOVER メッセージ送信タイマーを停止する。*/
    1531                 syscall(wai_sem(SEM_DHCP4_CLI_TIMER));
     1547                DHCP4_CLI_TIMER_LOCK();
    15321548                ct->timers[DHCP4C_TIMER_SND_DISC] = 0;
    1533                 syscall(sig_sem(SEM_DHCP4_CLI_TIMER));
     1549                DHCP4_CLI_TIMER_UNLOCK();
    15341550
    15351551                /* REQUEST メッセージを送信して REQUEST 状態に遷移する。*/
     
    15591575
    15601576                /* OFFER メッセージ受信タイマーを停止する。*/
    1561                 syscall(wai_sem(SEM_DHCP4_CLI_TIMER));
     1577                DHCP4_CLI_TIMER_LOCK();
    15621578                ct->timers[DHCP4C_TIMER_RCV_OFFER] = 0;
    1563                 syscall(sig_sem(SEM_DHCP4_CLI_TIMER));
     1579                DHCP4_CLI_TIMER_UNLOCK();
    15641580
    15651581                /* REQUEST メッセージを送信して REQUEST 状態に遷移する。*/
     
    16141630
    16151631        /* 再送信タイムアウトを設定する。*/
    1616         syscall(wai_sem(SEM_DHCP4_CLI_TIMER));
     1632        DHCP4_CLI_TIMER_LOCK();
    16171633        ct->timers[DHCP4C_TIMER_SND_DISC] = SYSTIM2TIMER(ct->interval);
    1618         syscall(sig_sem(SEM_DHCP4_CLI_TIMER));
    1619         }
     1634        DHCP4_CLI_TIMER_UNLOCK();
     1635        }
     1636
     1637#ifdef DHCP4_CLI_TASK
    16201638
    16211639/*
     
    16281646        int ix;
    16291647
    1630         syscall(wai_sem(SEM_DHCP4_CLI_TIMER));
     1648        DHCP4_CLI_TIMER_LOCK();
    16311649        for (ix = NUM_DHCP4C_TIMERS; ix -- > 0; ) {
    16321650                if (ct->timers[ix] != 0) {
     
    16341652                        if (ct->timers[ix] == 0) {
    16351653                                ct->flags = (ct->flags & ~DHCP4C_FLAG_TMOUT_MASK) | DHCP4C_FLAG_TMOUT_TIMER | ix;
    1636                                 syscall(sig_sem(SEM_DHCP4_CLI_READY));
     1654                                DHCP4_CLI_READY_SIGNAL(ct);
    16371655                                }
    16381656                        }
    16391657                }
    1640         syscall(sig_sem(SEM_DHCP4_CLI_TIMER));
     1658        DHCP4_CLI_TIMER_UNLOCK();
    16411659
    16421660        /* 1秒毎にタイムアウトする。*/
    16431661        timeout((callout_func)dhcpc_timer, ct, NET_TIMER_HZ);
    16441662        }
     1663
     1664#endif
    16451665
    16461666/*
     
    17481768        }
    17491769
     1770#ifdef DHCP4_CLI_TASK
     1771
    17501772/*
    17511773 *  dispatch_event -- イベント毎の処理
     
    17601782
    17611783                /* メッセージの受信とタイムアウトを待つ。*/
    1762                 syscall(wai_sem(SEM_DHCP4_CLI_READY));
     1784                DHCP4_CLI_READY_WAIT(ct);
    17631785
    17641786                if (ct->flags & DHCP4C_FLAG_RCV_MSG) {
     
    17781800        }
    17791801
     1802#endif
     1803
    17801804/*
    17811805 *  init_context -- DHCP クライアントコンテキスト構造体を初期化する。
     
    17831807
    17841808static void
    1785 init_context (T_DHCP4_CLI_CONTEXT *ct, ID cepid)
     1809init_context (T_DHCP4_CLI_CONTEXT *ct, ID tskid, ID cepid)
    17861810{
    17871811        memset(ct, 0, sizeof(*ct));
     1812        ct->tskid       = tskid;
    17881813        ct->cepid       = cepid;
    17891814        ct->sc          = IF_ETHER_NIC_GET_SOFTC();
     
    18801905
    18811906                /* SLEEP を解除する。*/
    1882                 wup_tsk(DHCP4_CLI_TASK);
     1907                context.fsm = DHCP4_FSM_WAKE;
     1908                context.timer = 0;
     1909                wup_tsk(context.tskid);
    18831910                return E_OK;
    18841911                }
     
    19701997                                }
    19711998                        }
    1972                 syscall(sig_sem(SEM_DHCP4_CLI_READY));
     1999                DHCP4_CLI_READY_SIGNAL((&context));
    19732000                }
    19742001        return E_OK;
    19752002        }
     2003
     2004#ifdef DHCP4_CLI_TASK
    19762005
    19772006/*
     
    19932022
    19942023        /* DHCP クライアントコンテキスト構造体を初期化する。*/
    1995         init_context(ct, (ID)exinf);
     2024        init_context(ct, tskid, (ID)exinf);
    19962025        ct->fsm = DHCP4_FSM_SLEEP;
    19972026
     
    20372066        }
    20382067
     2068#else
     2069
     2070T_DHCP4_CLI_CONTEXT *
     2071dhcp4_cli_initialize(ID tskid, ID cepid)
     2072{
     2073        T_DHCP4_CLI_CONTEXT *ct = &context;
     2074        /* DHCP クライアントコンテキスト構造体を初期化する。*/
     2075        init_context(ct, tskid, cepid);
     2076        ct->fsm = DHCP4_FSM_SLEEP;
     2077        ct->timer = TMO_FEVR;
     2078        return ct;
     2079        }
     2080
     2081int
     2082dhcp4_cli_get_timer(T_DHCP4_CLI_CONTEXT *ct)
     2083{
     2084        if (ct->fsm == DHCP4_FSM_SLEEP)
     2085                return TMO_FEVR;
     2086
     2087        return ct->timer;
     2088        }
     2089
     2090void
     2091dhcp4_cli_progress(T_DHCP4_CLI_CONTEXT *ct, int elapse)
     2092{
     2093        int ix;
     2094
     2095        if ((ct->fsm == DHCP4_FSM_SLEEP) || (ct->timer == TMO_FEVR))
     2096                return;
     2097
     2098        ct->timer -= elapse;
     2099        if (ct->timer > 0)
     2100                return;
     2101
     2102        /* 1秒毎にタイムアウトするようにタイマーを設定する。*/
     2103        ct->timer = 1000 * 1000;
     2104
     2105        for (ix = NUM_DHCP4C_TIMERS; ix-- > 0; ) {
     2106                if (ct->timers[ix] != 0) {
     2107                        ct->timers[ix] --;
     2108                        if (ct->timers[ix] <= 0) {
     2109                                ct->timers[ix] = 0;
     2110                                ct->flags = (ct->flags & ~DHCP4C_FLAG_TMOUT_MASK) | DHCP4C_FLAG_TMOUT_TIMER | ix;
     2111                                DHCP4_CLI_READY_SIGNAL(ct);
     2112                                }
     2113                        }
     2114                }
     2115        }
     2116
     2117void
     2118dhcp4_cli_wakeup(T_DHCP4_CLI_CONTEXT *ct)
     2119{
     2120        if (ct->fsm == DHCP4_FSM_WAKE) {
     2121                ct->flags = 0;
     2122                ct->error = E_OK;
     2123
     2124                /* メッセージ構造体を初期化する。*/
     2125                if ((ct->error = init_cli_msg(ct)) != E_OK)
     2126                        return;
     2127
     2128                ct->timer = 1000 * 1000;
     2129
     2130                /* SELECT 状態に遷移する。*/
     2131                start_select(ct);
     2132                }
     2133
     2134        if (ct->flags & DHCP4C_FLAG_RCV_MSG) {
     2135                while (ct->val_lst != NULL) {
     2136                        ct->error = eval_rcv_msg(ct);
     2137                        }
     2138                ct->flags &= ~DHCP4C_FLAG_RCV_MSG;
     2139                }
     2140        }
     2141
     2142void
     2143dhcp4_cli_timeout(T_DHCP4_CLI_CONTEXT *ct)
     2144{
     2145        if (ct->flags & DHCP4C_FLAG_TMOUT_MASK)
     2146                ct->error = dispatch_timeout(ct);
     2147
     2148        if (ct->error != E_OK || ct->fsm == DHCP4_FSM_SLEEP) {
     2149                /* 全ての TIMER をキャンセルする。*/
     2150                cancel_all_timers(ct);
     2151                ct->timer = TMO_FEVR;
     2152
     2153                /* メッセージ構造体を解放する。*/
     2154                rel_cli_msg(ct);
     2155
     2156                /* リースを解放後、再取得が指定されていなければ休止する。*/
     2157                if (!(ct->flags & DHCP4C_FLAG_RENEW)) {
     2158
     2159                        /* 休止する。*/
     2160                        if (ct->error == E_OK)
     2161                                syslog(LOG_NOTICE, "[DHCP4C] lease released, go to sleep.");
     2162                        else {
     2163                                syslog(LOG_NOTICE, "[DHCP4C] server not available, go to sleep, error: %s.", itron_strerror(ct->error));
     2164                                ct->error = E_OK;
     2165                                ct->fsm = DHCP4_FSM_SLEEP;
     2166                                }
     2167                        }
     2168                }
     2169        }
     2170
     2171#endif /* DHCP4_CLI_TASK */
    20392172#endif  /* of #ifdef DHCP4_CLI_CFG */
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/tinet/netapp/dhcp4_cli_var.h

    r337 r340  
    164164        RELTIM          interval;       /* 送信間隔                 */
    165165        ER_UINT         error;          /* エラー・データ長             */
     166        ID                      tskid;          /* タスクID */
    166167        ID              cepid;          /* CEP ID                       */
    167168        uint32_t        xid;            /* トランザクション ID          */
     
    170171        uint16_t        secs;           /* seconds since boot began     */
    171172        uint8_t         fsm;            /* 現在の状態                        */
     173        int timer;
    172174        } T_DHCP4_CLI_CONTEXT;
    173175
     
    184186#define DHCP4_FSM_REL_INFO      11      /* DHCPv4 の RFC2131 には無い。*/
    185187#define DHCP4_FSM_SLEEP         12      /* DHCPv4 の RFC2131 には無い。*/
     188#define DHCP4_FSM_WAKE          13      /* DHCPv4 の RFC2131 には無い。*/
    186189
    187190/* flag の定義 */
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/tinet/netinet/ip_igmp.c

    r337 r340  
    297297        igmph->type = IGMP_MEMBERSHIP_REPORT_V2;
    298298        igmph->time = 0;
    299         igmph->addr = dst;
     299        igmph->addr = htonl(dst);
    300300
    301301        /* 4 オクテット境界のデータ長 */
  • asp3_tinet_ecnl_rx/trunk/bnep_bridge/Debug/Makefile

    r337 r340  
    178178CFLAGS = $(COPTS) $(CDEFS) $(INCLUDES)
    179179
     180APPLDIRS := $(APPLDIRS) ../../ntshell/tlsf ../../ntshell/fatfs ../../ntshell/ntshell ../../ntshell/ntshell/core ../../ntshell/ntshell/util ../../ntshell/src
     181APPL_COBJS := $(APPL_COBJS) ntshell_main.o mbed_api.o fdtable.o io_stub.o ffarch.o diskio.o ff.o mmc_rspi.o ccsbcs.o ntshell.o text_editor.o text_history.o usrcmd.o vtrecv.o vtsend.o ntlibc.o ntstdio.o ntopt.o syscall.o tlsf.o
     182
    180183#
    181184#  アプリケーションプログラムに関する定義
    182185#
    183186APPLNAME = bnep_bridge
    184 APPLDIRS = ../src ../../ntshell/tlsf ../../ntshell/fatfs ../../ntshell/ntshell ../../ntshell/ntshell/core ../../ntshell/ntshell/util ../../ntshell/src $(SRCDIR)/$(TINETDIR)/netapp
     187APPLDIRS := $(APPLDIRS) ../src
    185188APPL_CFG = main.cfg
    186189APPL_CDL = main.cdl
    187 
    188 APPL_COBJS := $(APPL_COBJS) ntshell_main.o mbed_api.o fdtable.o io_stub.o ffarch.o diskio.o ff.o mmc_rspi.o ccsbcs.o ntshell.o text_editor.o text_history.o usrcmd.o vtrecv.o vtsend.o ntlibc.o ntstdio.o ntopt.o syscall.o tlsf.o
    189190
    190191APPL_DIRS := $(APPLDIRS) $(SRCDIR)/library
  • asp3_tinet_ecnl_rx/trunk/musl-1.1.18/include/bits/alltypes.h

    r337 r340  
    2020#define perror musl_perror
    2121#define strnlen musl_strnlen
     22#define strftime musl_strftime
     23#define asctime musl_asctime
     24#define tzset musl_tzset
     25#define clock musl_clock
    2226#endif
    2327#ifdef _MSC_VER
    2428#define __builtin_va_list char *
    2529#define __NEED_va_list
     30#define restrict __restrict
    2631#endif
    2732
  • asp3_tinet_ecnl_rx/trunk/musl-1.1.18/include/time.h

    r337 r340  
    6161int timespec_get(struct timespec *, int);
    6262
     63#ifndef CLOCKS_PER_SEC
    6364#define CLOCKS_PER_SEC 1000000L
     65#endif // CLOCKS_PER_SEC
    6466
    6567#define TIME_UTC 1
  • asp3_tinet_ecnl_rx/trunk/musl-1.1.18/src/time/localtime_r.c

    r337 r340  
    1919}
    2020
     21#ifndef __c2__
    2122weak_alias(__localtime_r, localtime_r);
     23#else
     24struct tm *localtime_r(const time_t *restrict t, struct tm *restrict tm)
     25{
     26        return __localtime_r(t, tm);
     27}
     28#endif
  • asp3_tinet_ecnl_rx/trunk/ntshell/ntshell/usrcmd.c

    r337 r340  
    790790}
    791791
     792int usrcmd_date(int argc, char **argv)
     793{
     794        int ret;
     795        struct timespec tp;
     796        char buf[30];
     797
     798        ret = shell_clock_gettime(CLOCK_REALTIME, &tp);
     799        if (ret != 0) {
     800                ntstdio_printf(&ntstdio, "clock_gettime error %d", ret);
     801                return 0;
     802        }
     803
     804        memset(buf, 0, sizeof(buf));
     805        if (ctime_r(&tp.tv_sec, buf) == NULL) {
     806                ntstdio_printf(&ntstdio, "ctime_r error");
     807                return 0;
     808        }
     809
     810        /* 改行コードの削除 */
     811        ret = ntlibc_strlen(buf);
     812        buf[ret - 1] = '\0';
     813
     814        ntstdio_printf(&ntstdio, "%s .%09u\n", buf, tp.tv_nsec);
     815        return 0;
     816}
     817
    792818int usrcmd_info(int argc, char **argv)
    793819{
  • asp3_tinet_ecnl_rx/trunk/ntshell/ntshell/usrcmd.h

    r337 r340  
    5050int usrcmd_mkdir(int argc, char **argv);
    5151int usrcmd_hexdump(int argc, char **argv);
     52int usrcmd_date(int argc, char **argv);
    5253
    5354int usrcmd_help(int argc, char **argv);
  • asp3_tinet_ecnl_rx/trunk/ntshell/src/netcmd.c

    r337 r340  
    6060#include "core/ntlibc.h"
    6161#include "util/ntstdio.h"
     62#include "ntp_cli.h"
    6263#include "kernel_cfg.h"
    6364
     
    469470        return 0;
    470471}
     472
     473int usrcmd_ntpc(int argc, char **argv)
     474{
     475        ntp_cli_execute();
     476        return 0;
     477}
  • asp3_tinet_ecnl_rx/trunk/ntshell/src/ntshell_main.c

    r337 r340  
    125125{
    126126        const cmd_table_t *p = cmd_table_info.table;
     127        int result = 0;
     128        int found = 0;
     129
    127130        if (strcmp((const char *)args[1], "help") == 0) {
    128                 usrcmd_help(args[0], (char **)&args[1]);
     131                found = 1;
     132                result = usrcmd_help(args[0], (char **)&args[1]);
    129133        }
    130134        else for (int i = 0; i < cmd_table_info.count; i++) {
    131135                if (strcmp((const char *)args[1], p->cmd) == 0) {
    132                         return p->func(args[0], (char **)&args[1]);
     136                        found = 1;
     137                        result = p->func(args[0], (char **)&args[1]);
     138                        break;
    133139                }
    134140                p++;
    135141        }
    136         /*if (setjmp(process_exit) == 0) {
    137                 main(args);
    138         }*/
     142
     143        if ((found == 0) && (((const char *)args[1])[0] != '\0'))
     144                printf("Unknown command found.\n");
     145
    139146        clean_fd();
    140         return 0;
     147
     148        return result;
    141149}
    142150
  • asp3_tinet_ecnl_rx/trunk/ntshell/src/shellif.h

    r337 r340  
    4040#ifdef _MSC_VER
    4141#define _CRT_NO_TIME_T
     42#define tm msc_tm
    4243#include <time.h>
    4344#include <errno.h>
    4445#include <limits.h>
    4546#include <stdlib.h>
    46 #define restrict __restrict
     47#undef tm
     48#undef NULL
    4749#endif
    4850
     
    106108#include "../musl-1.1.18/include/bits/stat.h"
    107109#include "../musl-1.1.18/include/sys/select.h"
     110#include "../musl-1.1.18/include/time.h"
    108111#include "../musl-1.1.18/include/signal.h"
    109112#include "../musl-1.1.18/include/stdio.h"
  • asp3_tinet_ecnl_rx/trunk/ntshell/src/syscall.c

    r337 r340  
    6060        switch (n) {
    6161        case SYS__llseek:
    62                 return shell_llseek(va_arg(ap, int), ((va_arg(ap, off_t)) << 32) + va_arg(ap, off_t), va_arg(ap, off_t *), va_arg(ap, int));
     62                return shell_llseek(va_arg(ap, int), va_arg(ap, off_t), va_arg(ap, off_t *), va_arg(ap, int));
    6363        case SYS__newselect:
    6464                ret = shell_select(va_arg(ap, int), va_arg(ap, fd_set *), va_arg(ap, fd_set *), va_arg(ap, fd_set *), va_arg(ap, struct timeval *));
     
    253253                break;
    254254        case SYS_ftruncate64:
    255                 ret = shell_ftruncate(va_arg(ap, int), ((va_arg(ap, off_t)) << 32) + va_arg(ap, off_t));
     255                ret = shell_ftruncate(va_arg(ap, int), va_arg(ap, off_t));
    256256                break;
    257257        case SYS_futex:
Note: See TracChangeset for help on using the changeset viewer.