CHAILink SDK  Version 1.3
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
CLC_ErrorCode LocalDevice_SCT_AssignController ( CPHOBJECT const  hLocalDevice,
CPUINT16 const  wSessionID,
CPDEVICEID const *const  pDevID,
CPUINT16 const  wControllerID,
CPCONTROLLERASSIGNMENT const *const  pAssignment 
)

Assign the specified controller to a target parameter. To be called from the SmartConnect target state engine.

Parameters
[in]hLocalDeviceHandle to the local device.
[in]wSessionIDThe SmartConnect session ID
[in]pDevIDPointer to the device hosting the controller. The DevID must be compliant with the section hosting the controller. (see CPSMARTCONNECTSECTIONITEM).
[in]wControllerIDThe controller ID
[in]pAssignmentPointer to the new assignment
Returns
Standard CHAILink Client return code. See CLC_ErrorCode enumeration.
Warning
This function can only be called in CopperLan context. This means in the pseudo task CPDoProcess(), in notification handlers or in asynchronous return handlers and not in SystemDoProcess() for instance.