Tutorial - Fields.basics

Jump to Topic:
MuSL contains over a 100+ fields that can be used together to construct messages for a wide range of application protocols. The fields are block-based and hierarchical. Each field has a set of attributes that can be static strings, options or variables, enumerated types, numbers and booleans. In general, a simple field in MuSL looks like this: Each field has a set of well-defined attributes that control the bytes generated during the serialization.

Complex fields are hierarchically modeled using Ruby's array construct, like so: That said there a number of intuitive shorter forms for commonly occurring fields like numbers, IP addresses, hexadecimal and binary strings. We'll explore this as we go through the tutorial. Anytime you see an edit box in the subsequent chapters, you can go ahead and type to see how the fields are serialized into bytes.