Example #1
0
int codeVersionTable1_3::statusfld2::write(DataOutputStream& ostream) { // throws IOException
    {   /** fix dependent sizes for mcAddress **/
    }
    {   /** fix dependent sizes for sourceIpAddress **/
    }
    {   /** fix dependent sizes for destinationIpAddress **/
    }






    int retVal= 0;
    // write mcAddress
    if ( mcAddress != NULL ) {
        retVal +=mcAddress->write(ostream);
    }
    // write sourceIpAddress
    if ( sourceIpAddress != NULL ) {
        retVal +=sourceIpAddress->write(ostream);
    }
    // write destinationIpAddress
    if ( destinationIpAddress != NULL ) {
        retVal +=destinationIpAddress->write(ostream);
    }
    // write sourcePortNumber
    ostream.writeUI16(sourcePortNumber);
    retVal +=2;
    // write destinatioPortNumber
    ostream.writeUI16(destinatioPortNumber);
    retVal +=2;
    // write applicationId
    ostream.writeUI16(applicationId);
    retVal +=2;
    // write modulationType
    ostream.writeUI8(modulationType);
    retVal +=1;
    // write bf2
    ostream.writeUI16(bf2);
    retVal +=2;

    return retVal;
}
Example #2
0
int OpenSessionResponse::write(DataOutputStream& ostream) { // throws IOException





    int retVal= 0;
    // write length
    ostream.writeUI8(length);
    retVal +=1;
    // write resourceIdentifier
    ostream.writeUI32(resourceIdentifier);
    retVal +=4;
    // write sessionStatus
    ostream.writeUI8(sessionStatus);
    retVal +=1;
    // write sessionNb
    ostream.writeUI16(sessionNb);
    retVal +=2;

    return retVal;
}