Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I decoded the bytes to ASCII and got</p> <pre><code>"o", "r", "g", "a", "n", "i", "s", "a", "t", "i", "o", "n", "I", "d", "=", "3", "&amp;", "\x10", "\x00", "\x00", "\x00", "P", "e", "o", "p", "l", "e", "P", "e", "o", "p", "l", "e", "L", "i", "n", "k", "j", "\b", "\x00", "\x00", "\t", "\x00", "\x00", "\x00", "\x0E", "\x00", "\x00", "\x00", "S", "e", "n", "i", "o", "r", "P", "e", "r", "s", "o", "n", "I", "d", "\x0E", "\x00", "\x00", "\x00", "J", "u", "n", "i", "o", "r", "P", "e", "r", "s", "o", "n", "I", "d", "\x11", "\x00", "\x00", "\x00", "S", "e", "n", "i", "o", "r", "P", "e", "r", "s", "o", "n", "M", "i", "s", "I", "d", "\x11", "\x00", "\x00", "\x00", "J", "u", "n", "i", "o", "r", "P", "e", "r", "s", "o", "n", "M", "i", "s", "I", "d", "\b", "\x00", "\x00", "\x00", "L", "i", "n", "k", "T", "y", "p", "e", "\x16", "\x00", "\x00", "\x00", "P", "a", "r", "e", "n", "t", "a", "l", "R", "e", "s", "p", "o", "n", "s", "i", "b", "i", "l", "i", "t", "y", "\b", "\x00", "\x00", "\x00", "P", "r", "i", "o", "r", "i", "t", "y", "\v", "\x00", "\x00", "\x00", "L", "a", "s", "t", "U", "p", "d", "a", "t", "e", "d", "\a", "\x00", "\x00", "\x00", "D", "e", "l", "e", "t", "e", "d", "\x01", "\x00", "\x00", "\x00", "\xD7", "\x0A", "\x00", "\x00", "\x00", "\x00", ... </code></pre> <p>The actual data seems to start after <code>"D", "e", "l", "e", "t", "e", "d",</code> and SeniorPersonId seems to be a 32 bit integer. I base that on the fact that the following <code>"\xD7", "\x0A", "\x00", "\x00"</code> => 0x0AD7 => 2775 and that is the same as the JuniorPersonId in your example above.</p> <pre><code>"\x01", "\x00", "\x00", "\x00", // SeniorPersonId "\xD7", "\x0A", "\x00", "\x00", // JuniorPersonId = 2775 "\x00", "\x00", "\x00", "\x00", // SeniorPersonMisId "\x00", "\x00", "\x00", "\x00", // JuniorPersonMisId "\x00", "\x00", "\x00", "\x00", // LinkType "\x00", // ParentalResponsibility "\x01", // Priority "\x80", "\xC3", ")", "\xC6", "\x85", "\xBF", "\xCE", "\b", // LastUpdated "\x00", // Deleted "\x02", "\x00", "\x00", "\x00", // SeniorPersonId "\x3C", "\x0C", "\x00", "\x00", // JuniorPersonId = 3132 "\x00", "\x00", "\x00", "\x00", // SeniorPersonMisId "\x00", "\x00", "\x00", "\x00", // JuniorPersonMisId "\x00", "\x00", "\x00", "\x00", // LinkType "\x00", // ParentalResponsibility "\x00", // Priority "\xF0", "\x83", "v", "\xC6", "\x85", "\xBF", "\xCE", "\b", // LastUpdated "\x00", // Deleted </code></pre> <p>An educated guess is that if all bytes of the field is 0x00 then it is null.</p> <p>The fields are obviously of different length. You will have to parse them accordingly.</p> <p>Here's an example on how you can go about to parse it.</p> <pre><code>public class Person { public int SeniorPersonId {get;set;} public int JuniorPersonId {get;set;} public int? SeniorPersonMisId {get;set;} public int? JuniorPersonMisId {get;set;} public int? LinkType {get;set;} public byte ParentalResponsibility {get;set;} public byte? Priority {get;set;} public DateTime LastUpdated {get;set;} public byte? Deleted {get;set;} } void Main() { var message = new byte[] { 0x01, 0x00, 0x00, 0x00, // SeniorPersonId 0xD7, 0x0A, 0x00, 0x00, // JuniorPersonId = 2775 0x00, 0x00, 0x00, 0x00, // SeniorPersonMisId 0x00, 0x00, 0x00, 0x00, // JuniorPersonMisId 0x00, 0x00, 0x00, 0x00, // LinkType 0x01, // ParentalResponsibility 0x01, // Priority 0x80, 0xC3, 0x29, 0xC6, 0x85, 0xBF, 0xCE, 0x08, // LastUpdated 0x00, // Deleted }; var person = new Person(); int pos = 0; person.SeniorPersonId = BitConverter.ToInt32(message, pos); person.JuniorPersonId = BitConverter.ToInt32(message, pos + 4); person.SeniorPersonMisId = BitConverter.ToInt32(message, pos + 8); if (person.SeniorPersonMisId == 0) person.SeniorPersonMisId = null; person.ParentalResponsibility = message[pos + 20]; person.LastUpdated = DateTime.FromBinary( BitConverter.ToInt64(message, pos + 22) ); } </code></pre> <p>Creates a person object with:</p> <pre><code>SeniorPersonId 1 JuniorPersonId 2775 SeniorPersonMisId null JuniorPersonMisId null LinkType null ParentalResponsibility 1 Priority null LastUpdated 2012-02-22 14:31:18 Deleted null </code></pre> <p>Now you just have to add the rest of the properties and create a parse method. I'll leave that to you.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload