TR69 添加示例

以Device下的Device.DeviceInfo为例

1. grep DeviceInfo -r ./

     (1) rootparams.h 文件中

        /* InternetGatewayDevice.DeviceInfo. */
        SVAR(DeviceInfo);

    (2) rootparams.c 文件中

        TRxObjNode DeviceDesc[] =

        {....

            {DeviceInfo,{{tObject,0,0}}, NULL,NULL, deviceInfoDesc,NULL},    

         ....

2. grep deviceInfoDesc -r ./

    (1) rootparams.c 文件中

        extern TRxObjNode deviceInfoDesc[];

    (2) baselineparams.c 文件中

         #include "sharedparams.h"

        #include "baselineparams.h"

        TRxObjNode  deviceInfoDesc[] = {
    {Manufacturer,{{tString,64,0}}, NULL,getManufacturer,NULL,NULL},
    {ManufacturerOUI,{{tString,6,0}}, NULL,getManufacturerOUI,NULL,NULL},
    {ModelName,{{tString,64,0}}, NULL,getModelName,NULL,NULL},
    {Description,{{tString,256,0}}, NULL,getDescription,NULL,NULL},
    {ProductClass,{{tString,256,0}},NULL,getProductClass,NULL,NULL},
    {SerialNumber,{{tString,256,0}}, NULL,getSerialNumber,NULL,NULL},
    {SoftwareVersion,{{tString,64,0}}, NULL,getSoftwareVersion,NULL,NULL},
    {HardwareVersion,{{tString,64,0}}, NULL,getHardwareVersion,NULL,NULL},
    {SpecVersion,{{tString,16,0}}, NULL,getSpecVersion,NULL,NULL},
    {ProvisioningCode,{{tString,64,0}}, setProvisioningCode,getProvisioningCode,NULL,NULL},
    {UpTime,{{tUnsigned,0,1}}, NULL,getUpTime,NULL,NULL},
    {DeviceLog,{{tString,32767,1}}, NULL,getDeviceLog,NULL,NULL},
    {NULL}
};

3. (1) Manufacturer

         grep Manufacturer -r ./

         baselineparams.h文件中

        SVAR(Manufactuer);

   (2) getManufacturer

        grep getManufacturer -r ./

        baselineparams.c文件中

        TRXGFUNC(getManufacturer);

       

        baselinehandlers.c文件中

       TRX_STATUS getManufacturer(char **value)

       {

        ....

       }

posted @ 2013-05-31 17:26  安心种田  阅读(440)  评论(0编辑  收藏  举报