@@ -19,12 +19,12 @@ void EtherAppReqSerializer::serialize(MemoryOutputStream& stream, const Ptr<cons
1919{
2020 auto startPosition = stream.getLength ();
2121 const auto & etherAppReq = staticPtrCast<const EtherAppReq>(chunk);
22- stream.writeUint32Be (B ( etherAppReq->getChunkLength ()) .get ());
22+ stream.writeUint32Be (etherAppReq->getChunkLength ().get <B> ());
2323 stream.writeUint32Be (etherAppReq->getRequestId ());
2424 stream.writeUint32Be (etherAppReq->getResponseBytes ());
25- int64_t remainders = B (etherAppReq->getChunkLength () - (stream.getLength () - startPosition)).get ();
25+ int64_t remainders = (etherAppReq->getChunkLength () - (stream.getLength () - startPosition)).get <B> ();
2626 if (remainders < 0 )
27- throw cRuntimeError (" EtherAppReq length = %d smaller than required %d bytes" , (int )B ( etherAppReq->getChunkLength ()) .get (), (int )B (stream.getLength () - startPosition).get ());
27+ throw cRuntimeError (" EtherAppReq length = %d smaller than required %d bytes" , (int )etherAppReq->getChunkLength ().get <B> (), (int )(stream.getLength () - startPosition).get <B> ());
2828 stream.writeByteRepeatedly (' ?' , remainders);
2929}
3030
@@ -38,20 +38,20 @@ const Ptr<Chunk> EtherAppReqSerializer::deserialize(MemoryInputStream& stream) c
3838 etherAppReq->setResponseBytes (stream.readUint32Be ());
3939 B remainders = dataLength - (stream.getPosition () - startPosition);
4040 ASSERT (remainders >= B (0 ));
41- stream.readByteRepeatedly (' ?' , B ( remainders) .get ());
41+ stream.readByteRepeatedly (' ?' , remainders.get <B> ());
4242 return etherAppReq;
4343}
4444
4545void EtherAppRespSerializer::serialize (MemoryOutputStream& stream, const Ptr<const Chunk>& chunk) const
4646{
4747 auto startPosition = stream.getLength ();
4848 const auto & etherAppResp = staticPtrCast<const EtherAppResp>(chunk);
49- stream.writeUint32Be (B ( etherAppResp->getChunkLength ()) .get ());
49+ stream.writeUint32Be (etherAppResp->getChunkLength ().get <B> ());
5050 stream.writeUint32Be (etherAppResp->getRequestId ());
5151 stream.writeUint32Be (etherAppResp->getNumFrames ());
52- int64_t remainders = B (etherAppResp->getChunkLength () - (stream.getLength () - startPosition)).get ();
52+ int64_t remainders = (etherAppResp->getChunkLength () - (stream.getLength () - startPosition)).get <B> ();
5353 if (remainders < 0 )
54- throw cRuntimeError (" EtherAppResp length = %d smaller than required %d bytes" , (int )B ( etherAppResp->getChunkLength ()) .get (), (int )B (stream.getLength () - startPosition).get ());
54+ throw cRuntimeError (" EtherAppResp length = %d smaller than required %d bytes" , (int )etherAppResp->getChunkLength ().get <B> (), (int )(stream.getLength () - startPosition).get <B> ());
5555 stream.writeByteRepeatedly (' ?' , remainders);
5656}
5757
@@ -65,7 +65,7 @@ const Ptr<Chunk> EtherAppRespSerializer::deserialize(MemoryInputStream& stream)
6565 etherAppResp->setNumFrames (stream.readUint32Be ());
6666 B remainders = dataLength - (stream.getPosition () - startPosition);
6767 ASSERT (remainders >= B (0 ));
68- stream.readByteRepeatedly (' ?' , B ( remainders) .get ());
68+ stream.readByteRepeatedly (' ?' , remainders.get <B> ());
6969 return etherAppResp;
7070}
7171
0 commit comments