metaonly module ti.ndk.config.Global

High level NDK stack configuration and settings

The Global module is required to be used by an NDK application. At minimum, it is used to link in the default flavor of the NDK stack library, as well as the other core libraries, and generates no code. [ more ... ]
Configuration settings sourced in ti/ndk/config/Global.xdc
var Global = xdc.useModule('ti.ndk.config.Global');
module-wide constants & types
    const Global.STACKRUN_FLG_CORE_0//  = 0x1;
    const Global.STACKRUN_FLG_CORE_1//  = 0x2;
    const Global.STACKRUN_FLG_CORE_10//  = 0x400;
    const Global.STACKRUN_FLG_CORE_11//  = 0x800;
    const Global.STACKRUN_FLG_CORE_12//  = 0x1000;
    const Global.STACKRUN_FLG_CORE_13//  = 0x2000;
    const Global.STACKRUN_FLG_CORE_14//  = 0x4000;
    const Global.STACKRUN_FLG_CORE_15//  = 0x8000;
    const Global.STACKRUN_FLG_CORE_16//  = 0x10000;
    const Global.STACKRUN_FLG_CORE_17//  = 0x20000;
    const Global.STACKRUN_FLG_CORE_18//  = 0x40000;
    const Global.STACKRUN_FLG_CORE_19//  = 0x80000;
    const Global.STACKRUN_FLG_CORE_2//  = 0x4;
    const Global.STACKRUN_FLG_CORE_20//  = 0x100000;
    const Global.STACKRUN_FLG_CORE_21//  = 0x200000;
    const Global.STACKRUN_FLG_CORE_22//  = 0x400000;
    const Global.STACKRUN_FLG_CORE_23//  = 0x800000;
    const Global.STACKRUN_FLG_CORE_24//  = 0x1000000;
    const Global.STACKRUN_FLG_CORE_25//  = 0x2000000;
    const Global.STACKRUN_FLG_CORE_26//  = 0x4000000;
    const Global.STACKRUN_FLG_CORE_27//  = 0x8000000;
    const Global.STACKRUN_FLG_CORE_28//  = 0x10000000;
    const Global.STACKRUN_FLG_CORE_29//  = 0x20000000;
    const Global.STACKRUN_FLG_CORE_3//  = 0x8;
    const Global.STACKRUN_FLG_CORE_30//  = 0x40000000;
    const Global.STACKRUN_FLG_CORE_31//  = 0x80000000;
    const Global.STACKRUN_FLG_CORE_4//  = 0x10;
    const Global.STACKRUN_FLG_CORE_5//  = 0x20;
    const Global.STACKRUN_FLG_CORE_6//  = 0x40;
    const Global.STACKRUN_FLG_CORE_7//  = 0x80;
    const Global.STACKRUN_FLG_CORE_8//  = 0x100;
    const Global.STACKRUN_FLG_CORE_9//  = 0x200;
    const Global.defaultBootTaskStackSize//  = 2048;
    const Global.defaultHighTaskStackSize//  = 5120;
    const Global.defaultLowTaskStackSize//  = 3072;
    const Global.defaultNdkTaskStackSize//  = 8192;
    const Global.defaultNdkTickPeriod//  = 100;
    const Global.defaultNormTaskStackSize//  = 4096;
 
 
 
 
        const Global.NONE;
        const Global.NAT;
        const Global.NAT_PPP;
        const Global.NAT_PPP_PPPOE;
        const Global.PPP;
        const Global.PPP_PPPOE;
        const Global.MIN;
 
        obj.username = String  ...
        obj.password = String  ...
module-wide config parameters
    Global.memDataSection// Memory Manager buffer data section = String ".far:NDK_MMBUFFER";
module-wide functions
 
DETAILS
The Global module is required to be used by an NDK application. At minimum, it is used to link in the default flavor of the NDK stack library, as well as the other core libraries, and generates no code.
However, if the user desires, it may be used to link in libraries, configure global stack settings, and generate NDK C configuration code.
The following libraries are linked in by default via the Global Module:
  • stack.lib
  • console.lib
  • hdlc.lib
  • miniPrintf.lib
  • netctrl.lib
  • nettool.lib
  • os.lib
  • servers.lib
The user can select which version of "stack.lib" to use via the following configuration parameters:
      config stackLibProtocol stackLibType
      config IPv6
stackLibType may be set to the following values. If the configuration parameter 'IPv6' is set to 'true', then this will result in the following IPv6 library selections:
  • Global.MIN : stk6.lib
  • Global.NONE : stack.lib (default)
  • Global.NAT : stk6_nat.lib
  • Global.NAT_PPP : stk6_nat_ppp.lib
  • Global.NAT_PPP_PPPOE : stk6_nat_ppp_pppoe.lib
  • Global.PPP : stk6_ppp.lib
  • Global.PPP_PPPOE : stk6_ppp_pppoe.lib
If the configuration parameter 'IPv6' is set to 'false', then this will result in the following IPv4 library selections:
  • Global.MIN : stk.lib
  • Global.NONE : stk_ppp_pppoe.lib (default)
  • Global.NAT : stk_nat.lib
  • Global.NAT_PPP : stk_nat_ppp.lib
  • Global.NAT_PPP_PPPOE : stk_nat_ppp_pppoe.lib
  • Global.PPP : stk_ppp.lib
  • Global.PPP_PPPOE : stk_ppp_pppoe.lib
In addition to NDK library selection, the Global module may be used to change global configuration settings of the stack. This includes settings for the:
  • NDK OSAL
  • Debug settings
  • Default stack task priority levels and stack sizes
  • Priority level and operating mode of the NDK scheduler thread.
  • Calling user defined hook functions
  • Enabling or disabling code generation.
Note that the Global module generates NDK C configuration code in order to manipulate the settings of the above mentioned items. In order for these settings to take effect, code generation must be enabled in the Global module.
If the code generation feature is enabled, then it's important to note that the C code for several functions will be created, which may cause a conflict if a program already has defined these functions, and then later enables code generation. These functions may also be updated with C API calls that will correspond to the RTSC configuration settings that were made.
The following list is a list of the C functions that are generated as a result of using the NDK RTSC configuration's code generating feature:
  • ti_ndk_config_Global_stackThread(): The NDK stack thread function.
  • NetworkOpen(): function that is called automatically by NC_NetStart().
  • NetworkClose(): function that is called automatically by NC_NetStart().
  • NetworkIPAddr(): function that is called automatically by NC_NetStart().
  • ti_ndk_config_Global_serviceReport(): Service report callback function.
The NDK RTSC configuration and code generation feature is really intended to be used with a new NDK program, not with an existing one. For example, if the user has an already existing NDK program, and they wish to change one of the configuration settings to that already existing program, then the NDK RTSC configuration should *not* be used. If the user were to use the NDK RTSC configuration in this manner, then the resulting program behavior would become unpredictable, due to having multiple NDK stack threads running with different configuration settings.
However, one could create a new NDK program that uses the RTSC configuration in order to easily see the C configuration code needed to change a particular stack setting. This generated C configuration code could then be copied from the new NDK program, and then pasted into the user's existing program to add that setting.
User Defined Hook Functions
Since the NDK stack thread function (as well as the other functions listed above) is generated when using this code generation feature, the user will not be able to directly add custom code into it. In order to allow this, a set of hook functions are provided. These hook functions may be called from various places from within the generated code. The user can define these hook functions as appropriate, and then assign the function names to the Global modules ndkHookFxn configuration parameters. For each ndkHookFxn configuration paramter that is defined, a call to that function will be added into the generated C code, as described by that ndkHookFxn parameter. Note that for some of these hook calls will be made with useful parameters in order to pass down information into the user's code (please refer to the hook descriptions for details on arguments passed and prototype signature for these hooks).
Note if the user specifies a hook function in the RTSC configuration script, but does not define this function in their C code, a linker error will result.
 
const Global.STACKRUN_FLG_CORE_0
Configuration settings
const Global.STACKRUN_FLG_CORE_0 = 0x1;
 
 
const Global.STACKRUN_FLG_CORE_1
Configuration settings
const Global.STACKRUN_FLG_CORE_1 = 0x2;
 
 
const Global.STACKRUN_FLG_CORE_10
Configuration settings
const Global.STACKRUN_FLG_CORE_10 = 0x400;
 
 
const Global.STACKRUN_FLG_CORE_11
Configuration settings
const Global.STACKRUN_FLG_CORE_11 = 0x800;
 
 
const Global.STACKRUN_FLG_CORE_12
Configuration settings
const Global.STACKRUN_FLG_CORE_12 = 0x1000;
 
 
const Global.STACKRUN_FLG_CORE_13
Configuration settings
const Global.STACKRUN_FLG_CORE_13 = 0x2000;
 
 
const Global.STACKRUN_FLG_CORE_14
Configuration settings
const Global.STACKRUN_FLG_CORE_14 = 0x4000;
 
 
const Global.STACKRUN_FLG_CORE_15
Configuration settings
const Global.STACKRUN_FLG_CORE_15 = 0x8000;
 
 
const Global.STACKRUN_FLG_CORE_16
Configuration settings
const Global.STACKRUN_FLG_CORE_16 = 0x10000;
 
 
const Global.STACKRUN_FLG_CORE_17
Configuration settings
const Global.STACKRUN_FLG_CORE_17 = 0x20000;
 
 
const Global.STACKRUN_FLG_CORE_18
Configuration settings
const Global.STACKRUN_FLG_CORE_18 = 0x40000;
 
 
const Global.STACKRUN_FLG_CORE_19
Configuration settings
const Global.STACKRUN_FLG_CORE_19 = 0x80000;
 
 
const Global.STACKRUN_FLG_CORE_2
Configuration settings
const Global.STACKRUN_FLG_CORE_2 = 0x4;
 
 
const Global.STACKRUN_FLG_CORE_20
Configuration settings
const Global.STACKRUN_FLG_CORE_20 = 0x100000;
 
 
const Global.STACKRUN_FLG_CORE_21
Configuration settings
const Global.STACKRUN_FLG_CORE_21 = 0x200000;
 
 
const Global.STACKRUN_FLG_CORE_22
Configuration settings
const Global.STACKRUN_FLG_CORE_22 = 0x400000;
 
 
const Global.STACKRUN_FLG_CORE_23
Configuration settings
const Global.STACKRUN_FLG_CORE_23 = 0x800000;
 
 
const Global.STACKRUN_FLG_CORE_24
Configuration settings
const Global.STACKRUN_FLG_CORE_24 = 0x1000000;
 
 
const Global.STACKRUN_FLG_CORE_25
Configuration settings
const Global.STACKRUN_FLG_CORE_25 = 0x2000000;
 
 
const Global.STACKRUN_FLG_CORE_26
Configuration settings
const Global.STACKRUN_FLG_CORE_26 = 0x4000000;
 
 
const Global.STACKRUN_FLG_CORE_27
Configuration settings
const Global.STACKRUN_FLG_CORE_27 = 0x8000000;
 
 
const Global.STACKRUN_FLG_CORE_28
Configuration settings
const Global.STACKRUN_FLG_CORE_28 = 0x10000000;
 
 
const Global.STACKRUN_FLG_CORE_29
Configuration settings
const Global.STACKRUN_FLG_CORE_29 = 0x20000000;
 
 
const Global.STACKRUN_FLG_CORE_3
Configuration settings
const Global.STACKRUN_FLG_CORE_3 = 0x8;
 
 
const Global.STACKRUN_FLG_CORE_30
Configuration settings
const Global.STACKRUN_FLG_CORE_30 = 0x40000000;
 
 
const Global.STACKRUN_FLG_CORE_31
Configuration settings
const Global.STACKRUN_FLG_CORE_31 = 0x80000000;
 
 
const Global.STACKRUN_FLG_CORE_4
Configuration settings
const Global.STACKRUN_FLG_CORE_4 = 0x10;
 
 
const Global.STACKRUN_FLG_CORE_5
Configuration settings
const Global.STACKRUN_FLG_CORE_5 = 0x20;
 
 
const Global.STACKRUN_FLG_CORE_6
Configuration settings
const Global.STACKRUN_FLG_CORE_6 = 0x40;
 
 
const Global.STACKRUN_FLG_CORE_7
Configuration settings
const Global.STACKRUN_FLG_CORE_7 = 0x80;
 
 
const Global.STACKRUN_FLG_CORE_8
Configuration settings
const Global.STACKRUN_FLG_CORE_8 = 0x100;
 
 
const Global.STACKRUN_FLG_CORE_9
Configuration settings
const Global.STACKRUN_FLG_CORE_9 = 0x200;
 
 
const Global.defaultBootTaskStackSize
Configuration settings
const Global.defaultBootTaskStackSize = 2048;
 
 
const Global.defaultDebugAbortLevel
Configuration settings
const Global.defaultDebugAbortLevel = Global.DBG_ERROR;
 
 
const Global.defaultHighTaskPriLevel
Configuration settings
const Global.defaultHighTaskPriLevel = 7;
 
 
const Global.defaultHighTaskStackSize
Configuration settings
const Global.defaultHighTaskStackSize = 5120;
 
 
const Global.defaultKernTaskPriLevel
Configuration settings
const Global.defaultKernTaskPriLevel = 9;
 
 
const Global.defaultLowTaskPriLevel
Configuration settings
const Global.defaultLowTaskPriLevel = 3;
 
 
const Global.defaultLowTaskStackSize
Configuration settings
const Global.defaultLowTaskStackSize = 3072;
 
 
const Global.defaultNdkTaskStackSize
Configuration settings
const Global.defaultNdkTaskStackSize = 8192;
 
 
const Global.defaultNdkTickPeriod
Configuration settings
const Global.defaultNdkTickPeriod = 100;
 
 
const Global.defaultNormTaskPriLevel
Configuration settings
const Global.defaultNormTaskPriLevel = 5;
 
 
const Global.defaultNormTaskStackSize
Configuration settings
const Global.defaultNormTaskStackSize = 4096;
 
 
enum Global.DebugLevel

This defines the legal values for the severity level of debug messages and debug aborts in the stack

Configuration settings
values of type Global.DebugLevel
    const Global.DBG_INFO;
    // Information Messages (DBG_INFO)
    const Global.DBG_WARN;
    // Warning Messages (DBG_WARN)
    const Global.DBG_ERROR;
    // Error Messages (DBG_ERROR)
    const Global.DBG_NONE;
    // No Messages (DBG_NONE)
 
 
enum Global.NetEventSchedOp

This defines the legal values for the operating mode setting for the Network event scheduler task

Configuration settings
values of type Global.NetEventSchedOp
    const Global.NC_OPMODE_POLLING;
    // Polling Mode
    const Global.NC_OPMODE_INTERRUPT;
    // Interrupt Mode
 
 
enum Global.NetEventSchedPri

This defines the legal values for the priority setting for the Network event scheduler task

Configuration settings
values of type Global.NetEventSchedPri
    const Global.NC_PRIORITY_LOW;
    // Low Priority
    const Global.NC_PRIORITY_HIGH;
    // High Priority
 
 
enum Global.StackLibProtocol

Defines the set of legal stack library types

Configuration settings
values of type Global.StackLibProtocol
    const Global.NONE;
    const Global.NAT;
    const Global.NAT_PPP;
    const Global.NAT_PPP_PPPOE;
    const Global.PPP;
    const Global.PPP_PPPOE;
    const Global.MIN;
 
 
struct Global.Account

This data structure is used to add a user account

Configuration settings
var obj = new Global.Account;
 
    obj.username = String  ...
    obj.password = String  ...
 
 
config Global.IPv6  // module-wide

When true, the IPv6 version of the NDK libraries will be used, otherwise the IPv4 versions will be linked

Configuration settings
Global.IPv6 = Bool true;
 
DETAILS
Default is IPv6.
 
config Global.autoOpenCloseFD  // module-wide

Automatically open/close file descriptor session

Configuration settings
Global.autoOpenCloseFD = Bool false;
 
DETAILS
When true, calls to fdOpenSession and fdCloseSession will be made automatically for dynamically created Tasks. This allows standard BSD sockets code fit more easily into an NDK application.
Note that this is only supported for dynamically created tasks that are created from within Task context (i.e. from within an already running Task function). Tasks created from the configuration or dynamically in main or a Hwi or Swi thread will not have support for this feature.
Disabled by default.
 
config Global.bootTaskStackSize  // module-wide

Sets the default stack size for the NDK boot task (NS_Boot)

Configuration settings
Global.bootTaskStackSize = Int Global.defaultBootTaskStackSize;
 
 
config Global.debugAbortLevel  // module-wide

Sets the severity level of system debug messages that that result in a system shutdown

Configuration settings
 
 
config Global.debugPrintLevel  // module-wide

Sets the severity level of system debug messages that are recorded to the debug log

Configuration settings
 
 
config Global.enableCodeGeneration  // module-wide

Enables the NDK stack thread and C stack configuration code to be generated automatically for the application. When false, no C code is generated, but NDK libraries are still linked into the application automatically

Configuration settings
Global.enableCodeGeneration = Bool true;
 
 
config Global.highTaskPriLevel  // module-wide

Sets the priority value for high priority NDK tasks

Configuration settings
Global.highTaskPriLevel = Int Global.defaultHighTaskPriLevel;
 
 
config Global.highTaskStackSize  // module-wide

Sets the default stack size for high priority NDK tasks

Configuration settings
Global.highTaskStackSize = Int Global.defaultHighTaskStackSize;
 
 
config Global.kernTaskPriLevel  // module-wide

Sets the priority value for kernel priority NDK tasks

Configuration settings
Global.kernTaskPriLevel = Int Global.defaultKernTaskPriLevel;
 
 
config Global.lowTaskPriLevel  // module-wide

Sets the priority value for low priority NDK tasks

Configuration settings
Global.lowTaskPriLevel = Int Global.defaultLowTaskPriLevel;
 
 
config Global.lowTaskStackSize  // module-wide

Sets the default stack size for low priority NDK tasks

Configuration settings
Global.lowTaskStackSize = Int Global.defaultLowTaskStackSize;
 
 
config Global.maxSockFileDesc  // module-wide

Determines the size of the socket file descriptor table

Configuration settings
Global.maxSockFileDesc = Int 10;
 
DETAILS
Set this variable to adjust the number of sockets that the file descriptor table (ti_ndk_socket_fdtable[]) can hold.
 
config Global.memDataSection  // module-wide

Memory Manager buffer data section

Configuration settings
Global.memDataSection = String ".far:NDK_MMBUFFER";
 
DETAILS
Section to place NDK memory manager buffers 'pit[]', 'pitBuffer[]' and 'Id2Size[]'.
 
config Global.memRawPageCount  // module-wide

Memory Manager page count

Configuration settings
Global.memRawPageCount = Int 16;
 
DETAILS
Used to set the size of OSAL's 'pit[]' and 'pitBuffer[]'.
 
config Global.memRawPageSize  // module-wide

Memory Manager page size

Configuration settings
Global.memRawPageSize = Int 3072;
 
DETAILS
Used to set the size of OSAL's 'pitBuffer[]'.
 
config Global.multiCoreStackRunMode  // module-wide

Set of flags which used to specify which cores the NDK stack should run on for multi-core processors. Default is to run the stack on core 0

Configuration settings
Global.multiCoreStackRunMode = Bits32 Global.STACKRUN_FLG_CORE_0;
 
DETAILS
This configuration parameter is only valid for C6000 multi-core processors.
The following flag values may be set either individually, or by OR-ing flags together, in order to run the stack on other cores (or combination of cores):
Currently supports up to 32 cores.
  • STACKRUN_FLG_CORE_0 - specifies that the stack should run on core 0
  • STACKRUN_FLG_CORE_1 - specifies that the stack should run on core 1
  • STACKRUN_FLG_CORE_2 - specifies that the stack should run on core 2
  • STACKRUN_FLG_CORE_3 - specifies that the stack should run on core 3
  • STACKRUN_FLG_CORE_4 - specifies that the stack should run on core 4
  • STACKRUN_FLG_CORE_5 - specifies that the stack should run on core 5
 
config Global.ndkThreadPri  // module-wide

Priority of the generated NDK task 'ti_ndk_config_Global_stackThread'

Configuration settings
Global.ndkThreadPri = Int Global.defaultNormTaskPriLevel;
 
 
config Global.ndkThreadStackSize  // module-wide

Stack size of the generated NDK task 'ti_ndk_config_Global_stackThread'

Configuration settings
Global.ndkThreadStackSize = Int Global.defaultNdkTaskStackSize;
 
 
config Global.ndkTickPeriod  // module-wide

Tick period in Clock ticks for the NDK heartbeat

Configuration settings
Global.ndkTickPeriod = Int Global.defaultNdkTickPeriod;
 
DETAILS
Default value set to 100 ticks to match the default tick rate of 1 tick = 1 millisecond. Note that if the a custom Timer is configured to drive the Clock module with a period other than 1 millisecond per tick, then you must adjust the ndkTickPeriod accordingly.
 
config Global.netSchedulerOpMode  // module-wide

The manner at which the NDK net scheduler task runs

Configuration settings
Global.netSchedulerOpMode = Global.NetEventSchedOp Global.NC_OPMODE_INTERRUPT;
 
 
config Global.netSchedulerPri  // module-wide

The priority level at which the NDK net scheduler task runs

Configuration settings
 
 
config Global.networkCloseHook  // module-wide

User defined hook function to run in the NDK Network Stop callback function, NetworkClose(). The Network Close callback function is called when the stack is about to shut down. This hook function will run immediately, upon entering the NetworkClose() function. It will not be passed any arguments

Configuration settings
Global.networkCloseHook = Void(*)() null;
 
DETAILS
For example, if your configuration sets 'networkCloseHook' to a function called "myNetCloseFxn":
var Global = xdc.useModule('ti.ndk.config.Global'); Global.networkCloseHook = '&myNetCloseFxn';
Then a call to "myNetCloseFxn" will be generated as follows:
myNetCloseFxn();
 
config Global.networkIPAddrHook  // module-wide

User defined hook function to run in the NDK Network IP address callback function, NetworkIPAddr(). The Network IP address callback function is called when an IP address is added or removed from the system. This hook function will run immediately, upon entering the NetworkIPAddr() function and is passed the same arguments passed to NetworkIPAddr(), IPAddr, IfIdx, fAdd

Configuration settings
Global.networkIPAddrHook = Void(*)() null;
 
DETAILS
For example, if your configuration sets 'networkIPAddrHook' to a function called "myIPAddrHook":
var Global = xdc.useModule('ti.ndk.config.Global'); Global.networkIPAddrHook = '&myIPAddrHook';
Then a call to "myIPAddrHook" will be generated as follows:
myIPAddrHook(hCfg);
Therefore, if you wish to use the configuration handle in "myIPAddrHook", then you should define it so that it can accept the arguments passed to it:
Void myIPAddrHook(IPN IPAddr, uint IfIdx, uint fAdd) { ... }
 
config Global.networkOpenHook  // module-wide

User defined hook function to run inside the NDK Network Start callback function, NetworkOpen(). The Network Start callback function is called when the stack is ready to begin the creation of application supplied network tasks. This hook function will run immediately, upon entering the NetworkOpen() function. Note that this function is called during the early stages of the stack startup, and must return in order for the stack to resume operations. It will not be passed any arguments

Configuration settings
Global.networkOpenHook = Void(*)() null;
 
DETAILS
For example, if your configuration sets 'networkOpenHook' to a function called "myNetOpenFxn":
var Global = xdc.useModule('ti.ndk.config.Global'); Global.networkOpenHook = '&myNetOpenFxn';
Then a call to "myNetOpenFxn" will be generated as follows:
myNetOpenFxn();
 
config Global.normTaskPriLevel  // module-wide

Sets the priority value for normal priority NDK tasks

Configuration settings
Global.normTaskPriLevel = Int Global.defaultNormTaskPriLevel;
 
 
config Global.normTaskStackSize  // module-wide

Sets the default stack size for normal priority NDK tasks

Configuration settings
Global.normTaskStackSize = Int Global.defaultNormTaskStackSize;
 
 
config Global.pbmDataSection  // module-wide

Packet Buffer Manager (PBM) buffer data section

Configuration settings
Global.pbmDataSection = String ".far:NDK_PACKETMEM";
 
DETAILS
Section to place PBM buffers 'pBufMem' and 'pHdrMem'.
 
config Global.pktNumFrameBufs  // module-wide

Packet Buffer Manager (PBM) number of frames

Configuration settings
Global.pktNumFrameBufs = Int 192;
 
DETAILS
Used to set the size of PBM 'pBufMem[]'.
 
config Global.pktSizeFrameBuf  // module-wide

Packet Buffer Manager (PBM) size frame buffer

Configuration settings
Global.pktSizeFrameBuf = Int 1536;
 
DETAILS
Used to set the size of PBM 'pHdrMem[]'.
 
config Global.realm1Name  // module-wide

The name for authorization realm 1

Configuration settings
Global.realm1Name = String null;
 
 
config Global.realm2Name  // module-wide

The name for authorization realm 2

Configuration settings
Global.realm2Name = String null;
 
 
config Global.realm3Name  // module-wide

The name for authorization realm 3

Configuration settings
Global.realm3Name = String null;
 
 
config Global.realm4Name  // module-wide

The name for authorization realm 4

Configuration settings
Global.realm4Name = String null;
 
 
config Global.serviceReportHook  // module-wide

User defined hook function to run in the NDK status report callback funtion, ti_ndk_config_Global_serviceReport(). This function will run at the beginning of the service report function and will be passed the the same arguments passed to ti_ndk_config_Global_serviceReport(), Item, Status, Report and h

Configuration settings
Global.serviceReportHook = Void(*)() null;
 
DETAILS
For example, if your configuration sets 'serviceReportHook' to a function called "myReportFxn":
var Global = xdc.useModule('ti.ndk.config.Global'); Global.serviceReportHook = '&myReportFxn';
Then a call to "myReportFxn" will be generated as follows:
myReportFxn(Item, Status, Report, h);
Therefore, if you wish to use the configuration handle in "myReportFxn", then you should define it so that it can accept the handle passed to it:
Void myReportFxn(uint Item, uint Status, uint Report, void *h) { ... }
 
config Global.stackBeginHook  // module-wide

User defined hook function to run in the NDK stack thread ti_ndk_config_Global_stackThread(). This function will run at the very beginning of the stack thread, before the call to NC_SystemOpen() is made. It will not be passed any arguments

Configuration settings
Global.stackBeginHook = Void(*)() null;
 
DETAILS
For example, if your configuration sets 'stackBeginHook' to a function called "myBeginFxn":
var Global = xdc.useModule('ti.ndk.config.Global'); Global.stackBeginHook = '&myBeginFxn';
Then a call to "myBeginFxn" will be generated as follows:
myBeginFxn();
 
config Global.stackDeleteHook  // module-wide

User defined hook function to run in the NDK stack thread ti_ndk_config_Global_stackThread(). This function will run immediately after exiting from the while() loop which contains the call to NC_NetStart(), but before the subsequent calls to CfgFree(hCfg) and NC_SystemClose(). It will be passed a handle to the configuration as well as the valued returned from NC_NetStart

Configuration settings
Global.stackDeleteHook = Void(*)() null;
 
DETAILS
For example, if your configuration sets 'stackDeleteHook' to a function called "myDeleteFxn":
var Global = xdc.useModule('ti.ndk.config.Global'); Global.stackDeleteHook = '&myDeleteFxn';
Then a call to "myDeleteFxn" will be generated after the call to NC_NetStart(), similar to the following:
do { rc = NC_NetStart(hCfg, ti_ndk_config_Global_NetworkOpen, ti_ndk_config_Global_NetworkClose, ti_ndk_config_Global_NetworkIPAddr); } while(rc > 0);
myDeleteFxn(hCfg, rc);
Therefore, if you wish to use the configuration handle in "myDeleteFxn", then you should define it so that it can accept the handle passed to it:
Void myDeleteFxn(void *hCfg, int rc) { ... }
 
config Global.stackInitHook  // module-wide

User defined hook function to run in the NDK stack thread ti_ndk_config_Global_stackThread(). This function will run immediately after the function call to create a new configuration, CfgNew(), and will be passed the handle to that configuration

Configuration settings
Global.stackInitHook = Void(*)() null;
 
DETAILS
For example, if your configuration sets 'stackInitHook' to a function called "myInitFxn":
var Global = xdc.useModule('ti.ndk.config.Global'); Global.stackInitHook = '&myInitFxn';
Then a call to "myInitFxn" will be generated as follows:
myInitFxn(hCfg);
Therefore, if you wish to use the configuration handle in "myInitFxn", then you should define it so that it can accept the handle passed to it:
Void myInitFxn(void *hCfg) { ... }
 
config Global.stackLibType  // module-wide

Variable used for choosing the NDK library to be linked into a program. Default stack library is PPP_PPPOE

Configuration settings
Global.stackLibType = Global.StackLibProtocol Global.NONE;
 
DETAILS
NONE: Links in support for NAT, PPP, and PPPoE (default). NAT: Links in support for NAT. NAT_PPP: Links in support for NAT and PPP. NAT_PPP_PPPOE: Links in support for NAT, PPP, and PPPoE. PPP: Links in support for PPP. PPP_PPPOE: Links in support for PPP and PPPoE. MIN: Minimal stack library. Does not link any support NAT, PPP or PPPoE.
 
config Global.stackRebootHook  // module-wide

User defined hook function to run in the NDK stack thread ti_ndk_config_Global_stackThread(). This function will run immediately after the return from NC_NetStart() and within the while() loop which contains the NC_NetStart() call. It will be passed a handle to the configuration as well as the valued returned from NC_NetStart

Configuration settings
Global.stackRebootHook = Void(*)() null;
 
DETAILS
For example, if your configuration sets 'stackRebootHook' to a function called "myRebootFxn":
var Global = xdc.useModule('ti.ndk.config.Global'); Global.stackRebootHook = '&myRebootFxn';
Then a call to "myRebootFxn" will be generated after the call to NC_NetStart(), but within the do/while loop, which allows this hook to run for the case of the NDK stack thread rebooting. The generated code will look similar to the following:
do { rc = NC_NetStart(hCfg, ti_ndk_config_Global_NetworkOpen, ti_ndk_config_Global_NetworkClose, ti_ndk_config_Global_NetworkIPAddr);
myRebootFxn(hCfg, rc);
} while(rc > 0);
Therefore, if you wish to use the configuration handle and return code in "myRebootFxn", then you should define it so that it has such parameters:
Void myRebootFxn(void *hCfg, int rc) { ... }
 
config Global.stackThreadUser  // module-wide

Allows user to define their own implementation of the NDK stack thread

Configuration settings
Global.stackThreadUser = Void(*)() null;
 
DETAILS
If set, the user is responsible for defining the NDK stack thread, which has no return value and has two parameters of type uintptr_t.
For example (C code):
void MYMODULE_stackThreadUser(uintptr_t arg0, uintptr_t arg1);
And in the configuration file:
Global.stackThreadUser = '&MYMODULE_stackThreadUser';
The user is also responsible for creating the SYS/BIOS Clock instance for the NDK 100ms heartbeat, calling appropriate NC_* APIs, and adding the appropriate C run time configuration code that matches the settings of the BIOS config file in the function. (e.g. if configuring the Ip module, the stack thread must call NC_SystemOpen(), 'ti_ndk_config_ip_init(hCfg)', etc.).
 
config Global.useSemLibs  // module-wide

Variable to cause the semaphore version of the NDK libraries to be linked into a program

Configuration settings
Global.useSemLibs = Bool false;
 
DETAILS
true: link libraries which use Semaphore for kernel mode. false: (Default) link libraries which use Task priority for kernel mode.
 
config Global.userAccounts  // module-wide

Array that holds all of the user accounts to be created

Configuration settings
Global.userAccounts = Global.Account[length] [ ];
 
 
Global.addUserAccount()  // module-wide

addUserAccount is used in a config file to add a new user account into the set of user accounts (and corresponding passwords) that will be added into the NDK configuration

Configuration settings
Global.addUserAccount(Global.Account account) returns Void
 
ARGUMENTS
account — structure of type Account
DETAILS
A user account is created by making a struct Account, setting that structs username and password for the account to be added, and then calling this function to add it. For example:
Account acct1; acct1.username = "user1"; acct1.password = "user1pass";
addUserAccount(acct1);
generated on Tue, 25 Aug 2020 01:58:55 GMT