internal TcAmsHeader(TcMarshallableAmsHeader mHeader) { this._target = new AmsAddress(mHeader.targetNetId, mHeader.targetPort); this._sender = new AmsAddress(mHeader.senderNetId, mHeader.senderPort); this._commandId = mHeader.cmdId; this._stateFlags = mHeader.stateFlags; this._cbData = mHeader.cbData; this._errCode = mHeader.errCode; this._hUser = mHeader.hUser; }
internal TcMarshallableAmsHeader GetMarshallableHeader() { TcMarshallableAmsHeader header = new TcMarshallableAmsHeader(); this._target.NetId.ToBytes().CopyTo(header.targetNetId, 0); header.targetPort = (ushort)this._target.Port; this._sender.NetId.ToBytes().CopyTo(header.senderNetId, 0); header.senderPort = (ushort)this._sender.Port; header.cmdId = this._commandId; header.stateFlags = this._stateFlags; header.cbData = this._cbData; header.errCode = this._errCode; header.hUser = this._hUser; return(header); }