Initialization Functions


Detailed Description

NdiCmdC.DLL Noetic Design, Inc. Command Interface Library.

This DLL can be used by Windows developers from C, C++, or Visual Basic. Use these functions to initiate communications.


Functions

NDICMDC_API void NdiCmd_Init (void)
 Initialize the DLL.
NDICMDC_API void NdiCmd_SetLogWindow (HWND wnd)
 Specify Output Control for Logging.
NDICMDC_API void NdiCmd_SetLogFile (char *path, BOOL append)
 Specify Output File for Logging.
NDICMDC_API void NdiCmd_LogIt (char *text)
 Send Text to the Log.
NDICMDC_API void NdiCmd_LogQuiet (BOOL quiet)
 Set Logging Level.
NDICMDC_API void NdiCmd_EnableDirect (void)
 Enable Direct.
NDICMDC_API BOOL NdiCmd_Search (void)
 Search for Ndi Devices.
NDICMDC_API BOOL NdiCmd_CheckPort (int i)
 Check Port.
NDICMDC_API int NdiCmd_GetFirstPort (void)
 Get First Port.
NDICMDC_API int NdiCmd_GetNextPort (int prev)
 Get Next Port.
NDICMDC_API void NdiCmd_SetPortEnabled (int i, BOOL enabled)
 Set Port Enabled.
NDICMDC_API BOOL NdiCmd_GetPortEnabled (int i)
 Get Port Enabled.
NDICMDC_API void NdiCmd_CloseAllPorts (void)
 Close All Ports.
NDICMDC_API int NdiCmd_GetWheelCommander (void)
 Get Wheel Commander.
NDICMDC_API int NdiCmd_GetNumWheelCommanders (void)
 Get Num Wheel Commanders.
NDICMDC_API int NdiCmd_GetWheelCommanderNum (int num)
 Get Wheel Commander Num.
NDICMDC_API int NdiCmd_GetUnicoder (void)
 Get Unicoder.
NDICMDC_API int NdiCmd_GetNumUnicoders (void)
 Get Num Unicoders.
NDICMDC_API int NdiCmd_GetUnicoderNum (int index)
 Get Unicoder Num.
NDICMDC_API void NdiCmd_RunWizard (BOOL wiz_mode)
 Run Wizard.
NDICMDC_API BOOL NdiCmd_UpdateFirmware (char *filename, HWND statwindow)
 Update Firmware.
NDICMDC_API BOOL NdiCmd_UpdateFirmwareEx (char *filename, HWND statwindow, BOOL special, BOOL direct)
 Update Firmware Ex.
NDICMDC_API void NdiCmd_SetStatusWindow (HWND hwnd)
 Set Status Window.


Function Documentation

NDICMDC_API BOOL NdiCmd_CheckPort ( int  i  ) 

Check Port.

Call this function to determine if the given port is accessible.

Parameters:
i the port number to check (values start at 1 under Windows)
Returns:
TRUE (1) if the specified port is accessible.

NDICMDC_API void NdiCmd_CloseAllPorts ( void   ) 

Close All Ports.

Call this function when you are about to exit your program.

Returns:
none.

NDICMDC_API void NdiCmd_EnableDirect ( void   ) 

Enable Direct.

Call this function to enable communication with bootloader inside Unicoder.

Returns:
TRUE (1) if a device has been found.

NDICMDC_API int NdiCmd_GetFirstPort ( void   ) 

Get First Port.

This function returns the port number of the first valid serial port.

Returns:
TRUE (1) if at least one valid serial port is present.

NDICMDC_API int NdiCmd_GetNextPort ( int  prev  ) 

Get Next Port.

Given a previous serial port number, this returns the next valid.

Parameters:
prev an integer representing a port previously found.
Returns:
integer value of next available port, or -1 if none present.

NDICMDC_API int NdiCmd_GetNumUnicoders ( void   ) 

Get Num Unicoders.

After calling NdiCmd_Search(), this returns the number of Unicoders found.

Returns:
integer count.

NDICMDC_API int NdiCmd_GetNumWheelCommanders ( void   ) 

Get Num Wheel Commanders.

After calling NdiCmd_Search(), this returns the number of WheelCommanders found.

Returns:
integer count.

NDICMDC_API BOOL NdiCmd_GetPortEnabled ( int  i  ) 

Get Port Enabled.

This function returns TRUE if the specified port is enabled for scanning.

Parameters:
i the port to check.
Returns:
TRUE (1) if this port is enabled for scanning.

NDICMDC_API int NdiCmd_GetUnicoder ( void   ) 

Get Unicoder.

After calling NdiCmd_Search(), this returns an integer handle representing the first Unicoder; use this value when accessing.

Returns:
integer handle.

NDICMDC_API int NdiCmd_GetUnicoderNum ( int  index  ) 

Get Unicoder Num.

After calling NdiCmd_Search(), this returns an integer handle representing the specified Unicoder; use this value when accessing.

Parameters:
index the number of the Unicoder whose handle should be retrieved
Returns:
integer handle.

NDICMDC_API int NdiCmd_GetWheelCommander ( void   ) 

Get Wheel Commander.

After calling NdiCmd_Search(), this returns an integer handle representing the WheelCommander; use this value when accessing.

Returns:
integer handle.

NDICMDC_API int NdiCmd_GetWheelCommanderNum ( int  num  ) 

Get Wheel Commander Num.

After calling NdiCmd_Search(), this returns an integer handle representing the specified WheelCommander; use this value when accessing.

Parameters:
index the number of the WheelCommadner whose handle should be retrieved
Returns:
integer handle.

NDICMDC_API void NdiCmd_Init ( void   ) 

Initialize the DLL.

Call this function first before using any other NdiCmdC functions.

NDICMDC_API void NdiCmd_LogIt ( char *  text  ) 

Send Text to the Log.

Call this function to send a text string to the log.

Parameters:
text a pointer to a null-terminated string
Returns:
none

NDICMDC_API void NdiCmd_LogQuiet ( BOOL  quiet  ) 

Set Logging Level.

Call this function to either quiet down logging or make it more verbose for debugging purposes.

Parameters:
quiet a boolean
Returns:
none

NDICMDC_API void NdiCmd_RunWizard ( BOOL  wiz_mode  ) 

Run Wizard.

This function launches the WheelCommander configuration wizard or settings dialogs, depending on the wiz_mode parameter.

Parameters:
wiz_mode boolean value, set to 1 to launch a step-by-step wizard, 0 for a normal dialog.
Returns:
none.

NDICMDC_API BOOL NdiCmd_Search ( void   ) 

Search for Ndi Devices.

Call this function to search all enabled serial ports for devices at the current baud rate.

Returns:
TRUE (1) if a device has been found.

NDICMDC_API void NdiCmd_SetLogFile ( char *  path,
BOOL  append 
)

Specify Output File for Logging.

Call this function to cause debug information to be written to a file.

Parameters:
path to file
BOOL append true to append to existing log; false to overwrite
Returns:
none

NDICMDC_API void NdiCmd_SetLogWindow ( HWND  wnd  ) 

Specify Output Control for Logging.

Call this function to cause debug information to be displayed on the specified edit control.

Parameters:
wnd a pointer to a rich edit control
Returns:
none

NDICMDC_API void NdiCmd_SetPortEnabled ( int  i,
BOOL  enabled 
)

Set Port Enabled.

Use this function to enable or disable the specified port number for future scanning with by NdiCmd_Search(). By default, all valid serial ports are enabled. This can result in long NdiCmd_Search() calls with certain BlueTooth serial port profile implementations; in that case, disable all but the expected port.

Parameters:
i the port to enable.
enabled a boolean value of 1 to enable or 0 to disable.
Returns:
none.

NDICMDC_API void NdiCmd_SetStatusWindow ( HWND  hwnd  ) 

Set Status Window.

Progress messages created during the upgrade process will be displayed on either the console (stdout) or in a Window, or will be suppressed, depending on the value of hwnd:

  • -1 send messages to stdout
  • 0 suppress output
  • HWND send messages to this windows handle, which will be sent WM_SETTEXT messages with LPARAM containing a pointer to the message text
    Parameters:
    hwnd a Windows handle in which status messages from this library can be displayed.
    Returns:
    none.

NDICMDC_API BOOL NdiCmd_UpdateFirmware ( char *  filename,
HWND  statwindow 
)

Update Firmware.

This function will perform all the tasks needed to upgrade the firmware.

Parameters:
filename a string (of type char *) containing the name of the file on your system.
statwindow a Windows handle (of type HWND) to display progress,-1 to display on the console, or 0 for none.
Returns:
TRUE (1) if the firmware was correctly updated.

NDICMDC_API BOOL NdiCmd_UpdateFirmwareEx ( char *  filename,
HWND  statwindow,
BOOL  special,
BOOL  direct 
)

Update Firmware Ex.

This function is the same as NdiCmd_UpdateFirmware() except that it provides additional control over which type of firmware file is provided as well as allows for emergency recovery when only the bootloader is valid.

Parameters:
filename a string (of type char *) containing the name of the file on your system.
statwindow a Windows handle (of type HWND) to display progress,-1 to display on the console, or 0 for none.
special a boolean indicating an alternate hardware configuration is present
direct a boolean indicating emergency recovery is needed
Returns:
TRUE (1) if the firmware was correctly updated.


Generated on Mon Mar 2 17:01:02 2009 for Nubotics Device Interface DLL by  doxygen 1.5.5