Functions
UA_AccessFn_Cyclic()
Function that cyclically manages the HMI access.
Direction | Name | Type | Description |
---|---|---|---|
In | t | UserAccessMgr_typ | An instance of the UserAccessMgr_typ |
UA_Logout()
Function that logs the current user out of the HMI.
Direction | Name | Type | Description |
---|---|---|---|
In | CurrentUser | UA_User_typ | The user to be logged out |
Return | UDINT | Returns a 0 when successful. |
UA_Login()
Function that logs the current user in to the HMI by checking username and password.
Direction | Name | Type | Description |
---|---|---|---|
In | pUserList | UDINT | Array of configured users on the system |
In | NumUsers | UDINT | The number of users in the user list |
In | InputUser | UA_User_typ | Login information of the user trying to login |
In Out | CurrentUser | UA_User_typ | Information of the user currently logged in |
Return | UDINT | 0 indicates the function ran successfully |
UA_LoginPasswordOnly()
Function that logs the current user in to the HMI by checking only the password.
Direction | Name | Type | Description |
---|---|---|---|
In | pUserList | UDINT | Array of configured users on the system |
In | NumUsers | UDINT | The number of users in the user list |
In | pInputPassword | UDINT | The string with the password attempt |
In Out | CurrentUser | UA_User_typ | Information of the user currently logged in |
Return | UDINT | 0 indicates the function ran successfully. |
UA_ListUsers()
Populates an array of strings with usernames and their levels.
Direction | Name | Type | Description |
---|---|---|---|
In | pUserList | UDINT | Array of configured users on the system |
In | NumUsers | UDINT | The number of users in the user list |
In | pStringArray | UDINT | An array for storing usernames and levels after the function call |
In | NumStrings | UDINT | The number of strings in the string array |
In | StringLength | UDINT | Max length of one username and user level combined |
Return | UDINT | 0 indicates the function ran successfully |
UA_AddUser()
Adds a user to the list of users.
Direction | Name | Type | Description |
---|---|---|---|
In | pUserList | UDINT | Array of configured users on the system |
In | NumUsers | UDINT | The number of users in the user list |
In | NewUser | UA_User_typ | The new user’s username, password, and access level |
Return | UDINT | 0 indicates the function ran successfully |
UA_RemoveUser()
Removes a user from the list of users.
Direction | Name | Type | Description |
---|---|---|---|
In | pUserList | UDINT | Array of configured users on the system |
In | NumUsers | UDINT | The number of users in the user list |
In | pUserName | UDINT | A pointer to the username to be removed |
Return | UDINT | 0 indicates the function ran successfully |
UA_ChangePassword()
This function will change the password for the user.
Direction | Name | Type | Description |
---|---|---|---|
In | pUserList | UDINT | Array of configured users on the system |
In | NumUsers | UDINT | The number of users in the user list |
In | pUserName | UDINT | A pointer to the username string associated with the password change |
In | pOldPassword | UDINT | The password string currently used in the user list |
In | pNewPassword | UDINT | The password string that will replace the old pass word |
Return | UDINT | 0 indicates the function ran successfully |
UA_ChangeUserLevel()
This function will change the user access level.
Direction | Name | Type | Description |
---|---|---|---|
In | pUserList | UDINT | Array of configured users on the system |
In | NumUsers | UDINT | The number of users in the user list |
In | pUserName | UDINT | A pointer to the username string associated with the password change |
In | NewUserLevel | USINT | The new user level |
Return | UDINT | 0 indicates the function ran successfully |
UA_GetTouchAction()
This function will grab the actions taken on a VC4 HMI and add the data into the UserAccessMgr_Int_HMI_typ.
Direction | Name | Type | Description |
---|---|---|---|
In Out | t | UserAccessMgr_Int_HMI_typ | An instance of the access manager HMI type with all necessary parts of the structure filled in |
Return | BOOL | Successful completion returns 1. A 0 indicates the 7000 error ocurred |
UA_SetHMIError()
This function will add an error ID and error string to the UserAccessMgr_Int_HMI_typ instance.
Direction | Name | Type | Description |
---|---|---|---|
In Out | t | UserAccessMgr_Int_HMI_typ | An instance of the access manager HMI type with all necessary parts of the structure filled in |
In | ErrorID | UINT | ErrorID associated with current error in User Access Manager structure |
Return | BOOL | This function will always return a 0. |
UA_Lock()
This function will set the StatusDP of an element to 0 (unlocked) or 1 (locked) based on the currently signed in user level.
Direction | Name | Type | Description |
---|---|---|---|
In | CurrentUserLevel | USINT | User level of the currently signed in user |
In | MinUserLevel | USINT | Minimum user level for access to current element |
In Out | StatusDP | UINT | Status equalling 0 is unlocked and 1 is locked |
Return | UINT | This function will always return a 0 |
UA_Hide()
This function will set the StatusDP of an element to 0 (visible) or 1 (invisible) based on the currently signed in user level.
Direction | Name | Type | Description |
---|---|---|---|
In | CurrentUserLevel | USINT | User level of the currently signed in user. |
In | MinUserLevel | USINT | Minimum user level for visibility of element |
In Out | StatusDP | UINT | Status equalling 0 is visible and 1 is invisible |
Return | Status | UINT | This function will always return a 0 |