Last Modified
2014-05-13 22:29:08 +0000
Requires

Description

Used for mapping LWES events in in an ESF file to a Ruby object. LWES::Event-derived classes are more memory efficient if your event definitions have many unused fields.

LWES::TypeDB.create_classes! with :sparse set to true will create classes subclassed from LWES::Event instead of LWES::Struct.

For users unable to use LWES::Listener, LWES::Event.parse may also be used with UDPSocket (distributed with Ruby) to parse events:

receiver = UDPSocket.new
receiver.bind(nil, port)
buffer, addr = receiver.recvfrom(65536)
event = LWES::Event.parse(buffer)