Class: OpenC3::MessagesWebSocketApi

Inherits:
CmdTlmWebSocketApi show all
Defined in:
lib/openc3/script/web_socket_api.rb

Overview

Log Messages WebSocket

Constant Summary

Constants inherited from WebSocketApi

WebSocketApi::DEFAULT_OPTIONS, WebSocketApi::USER_AGENT

Instance Method Summary collapse

Methods inherited from CmdTlmWebSocketApi

#generate_url

Methods inherited from WebSocketApi

cable_url, #check_protocol_frame, #connect, #connected?, #disconnect, #generate_auth, #parse_message, #read, #read_message, #subscribe, #unsubscribe, #wait_for_subscribed, #write, #write_action, #write_command

Constructor Details

#initialize(history_count: 0, start_time: nil, end_time: nil, level: nil, types: nil, **options) ⇒ MessagesWebSocketApi

Returns a new instance of MessagesWebSocketApi.



373
374
375
376
377
378
379
380
381
382
383
# File 'lib/openc3/script/web_socket_api.rb', line 373

def initialize(history_count: 0, start_time: nil, end_time: nil, level: nil, types: nil, **options)
  @identifier = {
    channel: "MessagesChannel",
    history_count: history_count
  }
  @identifier['start_time'] = start_time if start_time
  @identifier['end_time'] = end_time if end_time
  @identifier['level'] = level if level
  @identifier['types'] = types if types
  super(**options)
end