Exemple #1
0
    /*
     * fonction qui sérialise les donnés d'activations et les
     * enregistre dans la base de registre
     * */
    public string serializeInfos(EncodeToolSet encoder)
    {
        sbyte[] buffer = new sbyte[16];
        int off7 = 0;

        buffer[off7] = _random; 				off7++;//0
        buffer[off7] = _checkSum; 				off7++;//1
        buffer[off7] = (sbyte)(_endDate >> 16); off7++;//2
        buffer[off7] = (sbyte)(_endDate >> 8); 	off7++;//3
        buffer[off7] = (sbyte)(_endDate); 		off7++;//4

        for(int i=0 ; i<_macAddress.Length ; i++)
        {
            buffer[off7] = _macAddress[i];
            off7++;
        }

        buffer[off7] = _idsoft;					off7++;
        putShort(buffer,off7,_revendeur);		off7=off7 + 2;
        buffer[off7] = _version;					off7++;
        buffer[off7] = _nbLibs;

        return encoder.encodeSBytesUpperCase(buffer);
    }