6.13.2. STANDARD LOGON
This command allows a user to logon to the meter, granting it a certain level of access to the meter. This command requires a username and password which are sent in plaintext form.
Command: L”id,pw”
Response:
“id” is the user ID and “pw” is the password, with a null termination on the end of the password. Note that the
ID and password are case sensitive.
6.13.2.1. C# SAMPLE CODE
///
/// Generate a normal Atlas meter logon request /// Throws InvalidUsernameException if username is invalid or empty /// Throws InvalidPasswordException if passwword is invalid or empty
/// </summary> /// Username to logon with /// Password to login with
/// BinaryWriter containing request public void NormalLoginRequest(string username, string password, out BinaryWriterBE bw) {
if (username == "") throw new InvalidUsernameException("Login username is empty");
bw = new BinaryWriterBE(new MemoryStream(), Encoding.ASCII);
// Generate an unencrypted login request bw.Write((Byte)'L'); bw.WriteStringNull(username + ',' + password); }
///
/// BinaryReader containing the response data
///
{
AtlasOperationResult res = ValidateResponse(br); if (res == AtlasOperationResult.ValidResponse) { // shouldn't be a complex response return AtlasOperationResult.InvalidResponse;
} return res; }