Class: Vizcore::Sync::OscMessage
- Inherits:
-
Object
- Object
- Vizcore::Sync::OscMessage
- Defined in:
- lib/vizcore/sync/osc_message.rb
Overview
Minimal OSC 1.0 message parser for control sync.
Defined Under Namespace
Classes: Parser
Instance Attribute Summary collapse
-
#address ⇒ Object
readonly
Returns the value of attribute address.
-
#arguments ⇒ Object
readonly
Returns the value of attribute arguments.
-
#timetag ⇒ Object
readonly
Returns the value of attribute timetag.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(address:, arguments: [], timetag: nil) ⇒ OscMessage
constructor
A new instance of OscMessage.
Constructor Details
#initialize(address:, arguments: [], timetag: nil) ⇒ OscMessage
Returns a new instance of OscMessage.
21 22 23 24 25 |
# File 'lib/vizcore/sync/osc_message.rb', line 21 def initialize(address:, arguments: [], timetag: nil) @address = address @arguments = Array(arguments) @timetag = end |
Instance Attribute Details
#address ⇒ Object (readonly)
Returns the value of attribute address.
7 8 9 |
# File 'lib/vizcore/sync/osc_message.rb', line 7 def address @address end |
#arguments ⇒ Object (readonly)
Returns the value of attribute arguments.
7 8 9 |
# File 'lib/vizcore/sync/osc_message.rb', line 7 def arguments @arguments end |
#timetag ⇒ Object (readonly)
Returns the value of attribute timetag.
7 8 9 |
# File 'lib/vizcore/sync/osc_message.rb', line 7 def @timetag end |
Class Method Details
.parse(data) ⇒ Vizcore::Sync::OscMessage, ...
11 12 13 14 15 16 |
# File 'lib/vizcore/sync/osc_message.rb', line 11 def self.parse(data) parser = Parser.new(data) parser.parse_packet rescue StandardError nil end |