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::USER_AGENT

Instance Method Summary collapse

Methods inherited from CmdTlmWebSocketApi

#generate_url

Methods inherited from WebSocketApi

#connect, #connected?, #disconnect, #generate_auth, #read, #read_message, #subscribe, #unsubscribe, #write, #write_action

Constructor Details

#initialize(history_count: 0, start_time: nil, end_time: nil, level: nil, types: nil, url: nil, write_timeout: 10.0, read_timeout: 10.0, connect_timeout: 5.0, authentication: nil, scope: $openc3_scope) ⇒ MessagesWebSocketApi

Returns a new instance of MessagesWebSocketApi.



230
231
232
233
234
235
236
237
238
239
240
# File 'lib/openc3/script/web_socket_api.rb', line 230

def initialize(history_count: 0, start_time: nil, end_time: nil, level: nil, types: nil, url: nil, write_timeout: 10.0, read_timeout: 10.0, connect_timeout: 5.0, authentication: nil, scope: $openc3_scope)
  @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(url: url, write_timeout: write_timeout, read_timeout: read_timeout, connect_timeout: connect_timeout, authentication: authentication, scope: scope)
end