TraceMgrPacketReadNext (FUN) ¶ FUNCTION TraceMgrPacketReadNext : RTS_IEC_HANDLE Reads the contents of the next record. Note if the result code is ERR_ENTRIES_REMAINING, data has been successfully copied to pTraceBuffer, but more data can be read by a subsequent call. (Either because the destination buffer was too small, or because new data has been recorded in the mean time.) Note Data is always returned in little endian byte order even if the device has big endian byte order. InOut: Scope Name Type Comment Return TraceMgrPacketReadNext RTS_IEC_HANDLE Returns the runtime system error code (see CmpErrors.library): ERR_PARAMETER if hPacket is not a valid packet handle or if hPrevRecord is not a valid record handle ERR_NO_OBJECT if there is no next record ERR_NOTINITIALIZED if the packet is not complete ERR_TIMEOUT if reading took too long ERR_ENTRIES_REMAINING if more data can be read by a subsequent call (this is not an error) Input hPacket RTS_IEC_HANDLE The trace packet handle hPrevRecord RTS_IEC_HANDLE The trace record handle of the current record Inout pTraceBuffer TraceRecordEntry Pointer to the destination buffer pulReadBytes UDINT Size of the destination buffer in bytes (in), number of bytes copied (out) pResult RTS_IEC_RESULT The result code
TraceMgrPacketReadNext2 (FUN) ¶ FUNCTION TraceMgrPacketReadNext2 : RTS_IEC_HANDLE Reads the contents of the next record, starting at a given time stamp. Only entries with a time stamp greater than or equal to ulTimestamp are copied. If the time stamp is zero, the function behaves like TraceMgrPacketReadNext . Note if the result code is ERR_ENTRIES_REMAINING, data has been successfully copied to pTraceBuffer, but more data can be read by a subsequent call. (Either because the destination buffer was too small, or because new data has been recorded in the mean time.) Note Data is always returned in little endian byte order even if the device has big endian byte order. InOut: Scope Name Type Comment Return TraceMgrPacketReadNext2 RTS_IEC_HANDLE Returns the runtime system error code (see CmpErrors.library): ERR_PARAMETER if hPacket is not a valid packet handle or if hPrevRecord is not a valid record handle ERR_NO_OBJECT if there is no next record ERR_NOTINITIALIZED if the packet is not complete ERR_TIMEOUT if reading took too long ERR_ENTRIES_REMAINING if more data can be read by a subsequent call (this is not an error) Input hPacket RTS_IEC_HANDLE The trace packet handle hPrevRecord RTS_IEC_HANDLE The trace record handle of the current record ulTimestamp UDINT The time stamp (relative to the trace start time) from where to start copying Inout pTraceBuffer TraceRecordEntry Pointer to the destination buffer pulReadBytes UDINT Size of the destination buffer in bytes (in), number of bytes copied (out) pResult RTS_IEC_RESULT The result code
TraceMgrPacketResetTrigger (FUN) ¶ FUNCTION TraceMgrPacketResetTrigger : RTS_IEC_RESULT Resets the trigger of a trace packet. The start time and date of of the trigger is reset to 0 and the trigger is set to state enabled (if it is not disabled). InOut: Scope Name Type Comment Return TraceMgrPacketResetTrigger RTS_IEC_RESULT Returns the runtime system error code (see CmpErrors.library): ERR_PARAMETER if hPacket is not a valid packet handle Input hPacket RTS_IEC_HANDLE The trace packet handle
TraceMgrPacketRestart (FUN) ¶ FUNCTION TraceMgrPacketRestart : RTS_IEC_RESULT Restarts a trace packet and resets the start time and the trigger. In contrast to TraceMgrPacketStart, the trace is stopped and the start time is reset to the current time before it is started again. InOut: Scope Name Type Comment Return TraceMgrPacketRestart RTS_IEC_RESULT Returns the runtime system error code (see CmpErrors.library): ERR_PARAMETER if hPacket is not a valid packet handle Input hPacket RTS_IEC_HANDLE The trace packet handle
TraceMgrPacketRestore (FUN) ¶ FUNCTION TraceMgrPacketRestore : RTS_IEC_HANDLE Loads a trace packet from a trace file. Both the trace configuration and the current trace values are restored. InOut: Scope Name Type Comment Return TraceMgrPacketRestore RTS_IEC_HANDLE Returns the runtime system error code (see CmpErrors.library): ERR_PARAMETER if hPacket is not a valid handle, or if pszFileName is not a valid file path ERR_NOMEMORY if the memory is not sufficient for opening the file ERR_NOT_SUPPORTED if reading from files is not supported by the runtime system or if an addressing mode is not supported (e.g. symbolic access) ERR_NO_OBJECT if opening the file failed ERR_FAILED if opening the file failed Inout Const pszFileName STRING The file path (in) Inout pResult RTS_IEC_RESULT The result code (out)
UserMgrIsActive (FUN) ¶ FUNCTION UserMgrIsActive : BOOL Checks if the user management is active. InOut: Scope Name Type Comment Return UserMgrIsActive BOOL TRUE: The user management is activated or enforced. FALSE: The user management is not activated.
UserMgrLogin (FUN) ¶ FUNCTION UserMgrLogin : RTS_IEC_HANDLE Logs user in to the runtime system requiring an active user management. InOut: Scope Name Type Comment Return UserMgrLogin RTS_IEC_HANDLE Handle to the user or RTS_INVALID_HANDLE if not available Input pszUser REFERENCE TO STRING Name of the user, limited to 59 chars pszPassword REFERENCE TO STRING Password (plain text), limited to 59 chars pResult POINTER TO RTS_IEC_RESULT Pointer to error code ERR_OK: User/password combination is valid ERR_ACTIVATE_USERMGMT: The login was successful. But the user management is enforced and not active. Activate the user management. ERR_CHANGE_PASSWORD: The login was successful. But the user must change his password. ERR_NO_USERMGMT: Login was not successful. The user management is not activated. Use empty user and password to login. ERR_NO_ACCESS_RIGHTS: The login was not successful, because of another reason.
UserMgrLogout (FUN) ¶ FUNCTION UserMgrLogout : RTS_IEC_RESULT Logout specified by the user InOut: Scope Name Type Comment Return UserMgrLogout RTS_IEC_RESULT Error code ERR_OK: User is available and logout succeeded ERR_PARAMETER: If user is not available ERR_INVALID_HANDLE: hUser is invalid or unknown Input hUser RTS_IEC_HANDLE Handle to the user
UserMgrRelogin (FUN) ¶ FUNCTION UserMgrRelogin : RTS_IEC_RESULT Re-logs user in to the runtime system using an active user management. Using this API it is possible to change the user identity of the given handle. If the given credentials are not valid, no change will be done. InOut: Scope Name Type Comment Return UserMgrRelogin RTS_IEC_RESULT Error code ERR_OK: User/password combination is valid ERR_NOTINITIALIZED: The user management is not initialized or it is not loaded yet ERR_RELOGIN: hUser known, but not logged in ERR_FAILED: Password is wrong. ERR_USER_MISMATCH: User name does not match ERR_INVALID_HANDLE: hUser is invalid or unknown Input hUser RTS_IEC_HANDLE Handle to the user pszUser REFERENCE TO STRING Name of the user, limited to 59 chars pszPassword REFERENCE TO STRING Password (plain text), limited to 59 chars
Authorization ¶ UserMgrGetUserAccessRights (Function) UserMgrHasUserAccessRights (Function)