famaMac: encoding/decoding PDUs -> states