Module: DjiMqttConnect::Factories::ServicesMessages

Included in:
DjiMqttConnect::Factories
Defined in:
lib/dji_mqtt_connect/factories/services_messages.rb,
lib/dji_mqtt_connect/factories/services/camera_aim.rb,
lib/dji_mqtt_connect/factories/services/ota_create.rb,
lib/dji_mqtt_connect/factories/services/charge_open.rb,
lib/dji_mqtt_connect/factories/services/charge_close.rb,
lib/dji_mqtt_connect/factories/services/drone_format.rb,
lib/dji_mqtt_connect/factories/services/gimbal_reset.rb,
lib/dji_mqtt_connect/factories/services/live_control.rb,
lib/dji_mqtt_connect/factories/services/device_format.rb,
lib/dji_mqtt_connect/factories/services/device_reboot.rb,
lib/dji_mqtt_connect/factories/services/drc_mode_exit.rb,
lib/dji_mqtt_connect/factories/services/esim_activate.rb,
lib/dji_mqtt_connect/factories/services/camera_look_at.rb,
lib/dji_mqtt_connect/factories/services/drc_mode_enter.rb,
lib/dji_mqtt_connect/factories/services/fileupload_list.rb,
lib/dji_mqtt_connect/factories/services/rtk_calibration.rb,
lib/dji_mqtt_connect/factories/services/sim_slot_switch.rb,
lib/dji_mqtt_connect/factories/services/fileupload_start.rb,
lib/dji_mqtt_connect/factories/services/camera_photo_stop.rb,
lib/dji_mqtt_connect/factories/services/camera_photo_take.rb,
lib/dji_mqtt_connect/factories/services/cover_force_close.rb,
lib/dji_mqtt_connect/factories/services/fileupload_update.rb,
lib/dji_mqtt_connect/factories/services/photo_storage_set.rb,
lib/dji_mqtt_connect/factories/services/video_storage_set.rb,
lib/dji_mqtt_connect/factories/services/camera_mode_switch.rb,
lib/dji_mqtt_connect/factories/services/camera_screen_drag.rb,
lib/dji_mqtt_connect/factories/services/camera_exposure_set.rb,
lib/dji_mqtt_connect/factories/services/camera_screen_split.rb,
lib/dji_mqtt_connect/factories/services/sdr_workmode_switch.rb,
lib/dji_mqtt_connect/factories/services/esim_operator_switch.rb,
lib/dji_mqtt_connect/factories/services/ir_metering_area_set.rb,
lib/dji_mqtt_connect/factories/services/ir_metering_mode_set.rb,
lib/dji_mqtt_connect/factories/services/camera_focus_mode_set.rb,
lib/dji_mqtt_connect/factories/services/camera_recording_stop.rb,
lib/dji_mqtt_connect/factories/services/ir_metering_point_set.rb,
lib/dji_mqtt_connect/factories/services/supplement_light_open.rb,
lib/dji_mqtt_connect/factories/services/camera_focus_value_set.rb,
lib/dji_mqtt_connect/factories/services/camera_recording_start.rb,
lib/dji_mqtt_connect/factories/services/supplement_light_close.rb,
lib/dji_mqtt_connect/factories/services/camera_focal_length_set.rb,
lib/dji_mqtt_connect/factories/services/camera_exposure_mode_set.rb,
lib/dji_mqtt_connect/factories/services/battery_store_mode_switch.rb,
lib/dji_mqtt_connect/factories/services/camera_point_focus_action.rb,
lib/dji_mqtt_connect/factories/services/battery_maintenance_switch.rb,
lib/dji_mqtt_connect/factories/services/air_conditioner_mode_switch.rb

Instance Method Summary collapse

Instance Method Details

#build_thing_product_air_conditioner_mode_switch_services_messageObject

Dock Air Conditioner Working Mode Switch ###



7
8
9
# File 'lib/dji_mqtt_connect/factories/services/air_conditioner_mode_switch.rb', line 7

def build_thing_product_air_conditioner_mode_switch_services_message
  Thing::Product::AirConditionerModeSwitchServicesMessage.build(action: Thing::Product::AirConditionerModeSwitchServicesMessage::ACTION_COOLING)
end

#build_thing_product_air_conditioner_mode_switch_services_reply_message(result: 0) ⇒ Object



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/dji_mqtt_connect/factories/services/air_conditioner_mode_switch.rb', line 11

def build_thing_product_air_conditioner_mode_switch_services_reply_message(result: 0)
  message_data = {
    result: result,
    output: {
      status: "ok"
    }
  }

  Thing::Product::AirConditionerModeSwitchServicesReplyMessage.new(
    bid: SecureRandom.uuid,
    tid: SecureRandom.uuid,
    timestamp: Message.current_timestamp,
    _method: "air_conditioner_mode_switch",
    _data: message_data,
    data: message_data
  )
end

#build_thing_product_alarm_state_switch_services_messageObject



5
6
7
# File 'lib/dji_mqtt_connect/factories/services_messages.rb', line 5

def build_thing_product_alarm_state_switch_services_message
  Thing::Product::AlarmStateSwitchServicesMessage.build(action: Thing::Product::AlarmStateSwitchServicesMessage::ACTION_OPEN)
end

#build_thing_product_battery_maintenance_switch_services_messageObject

Battery Maintenance State Switch ###



7
8
9
# File 'lib/dji_mqtt_connect/factories/services/battery_maintenance_switch.rb', line 7

def build_thing_product_battery_maintenance_switch_services_message
  Thing::Product::BatteryMaintenanceSwitchServicesMessage.build(action: Thing::Product::BatteryMaintenanceSwitchServicesMessage::ACTION_ENABLE)
end

#build_thing_product_battery_maintenance_switch_services_reply_message(result: 0) ⇒ Object



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/dji_mqtt_connect/factories/services/battery_maintenance_switch.rb', line 11

def build_thing_product_battery_maintenance_switch_services_reply_message(result: 0)
  message_data = {
    result: result,
    output: {
      status: "ok"
    }
  }

  Thing::Product::BatteryMaintenanceSwitchServicesReplyMessage.new(
    bid: SecureRandom.uuid,
    tid: SecureRandom.uuid,
    timestamp: Message.current_timestamp,
    _method: "battery_maintenance_switch",
    _data: message_data,
    data: message_data
  )
end

#build_thing_product_battery_store_mode_switch_services_messageObject

Battery Operating Mode Switch ###



7
8
9
# File 'lib/dji_mqtt_connect/factories/services/battery_store_mode_switch.rb', line 7

def build_thing_product_battery_store_mode_switch_services_message
  Thing::Product::BatteryStoreModeSwitchServicesMessage.build(action: Thing::Product::BatteryStoreModeSwitchServicesMessage::ACTION_SCHEDULE_MODE)
end

#build_thing_product_battery_store_mode_switch_services_reply_message(result: 0) ⇒ Object



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/dji_mqtt_connect/factories/services/battery_store_mode_switch.rb', line 11

def build_thing_product_battery_store_mode_switch_services_reply_message(result: 0)
  message_data = {
    result: result,
    output: {
      status: "ok"
    }
  }

  Thing::Product::BatteryStoreModeSwitchServicesReplyMessage.new(
    bid: SecureRandom.uuid,
    tid: SecureRandom.uuid,
    timestamp: Message.current_timestamp,
    _method: "battery_store_mode_switch",
    _data: message_data,
    data: message_data
  )
end

#build_thing_product_camera_aim_services_message(data: build_thing_product_camera_aim_services_message_data) ⇒ Object

Payload control - Double tap to AIM ###



7
8
9
10
11
# File 'lib/dji_mqtt_connect/factories/services/camera_aim.rb', line 7

def build_thing_product_camera_aim_services_message(data: build_thing_product_camera_aim_services_message_data)
  Thing::Product::CameraAimServicesMessage.build(
    data: data
  )
end

#build_thing_product_camera_aim_services_message_dataObject



13
14
15
16
17
18
19
20
21
# File 'lib/dji_mqtt_connect/factories/services/camera_aim.rb', line 13

def build_thing_product_camera_aim_services_message_data
  {
    locked: true,
    payload_index: "39-0-7",
    camera_type: Thing::Product::CameraAimServicesMessage::CAMERA_TYPE_WIDE,
    x: 0.5,
    y: 0.5
  }
end

#build_thing_product_camera_aim_services_reply_message(result: 0) ⇒ Object



23
24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/dji_mqtt_connect/factories/services/camera_aim.rb', line 23

def build_thing_product_camera_aim_services_reply_message(result: 0)
  message_data = {
    result: result
  }

  Thing::Product::CameraAimServicesReplyMessage.new(
    bid: SecureRandom.uuid,
    tid: SecureRandom.uuid,
    timestamp: Message.current_timestamp,
    _method: "camera_aim",
    _data: message_data,
    data: message_data
  )
end

#build_thing_product_camera_exposure_mode_set_services_message(data: build_thing_product_camera_exposure_mode_set_services_message_data) ⇒ Object

Payload control - Camera exposure mode setting ###



7
8
9
10
11
# File 'lib/dji_mqtt_connect/factories/services/camera_exposure_mode_set.rb', line 7

def build_thing_product_camera_exposure_mode_set_services_message(data: build_thing_product_camera_exposure_mode_set_services_message_data)
  Thing::Product::CameraExposureModeSetServicesMessage.build(
    data: data
  )
end

#build_thing_product_camera_exposure_mode_set_services_message_dataObject



13
14
15
16
17
18
19
# File 'lib/dji_mqtt_connect/factories/services/camera_exposure_mode_set.rb', line 13

def build_thing_product_camera_exposure_mode_set_services_message_data
  {
    camera_type: "zoom",
    exposure_mode: 1,
    payload_index: "39-0-7"
  }
end

#build_thing_product_camera_exposure_mode_set_services_reply_message(result: 0) ⇒ Object



21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/dji_mqtt_connect/factories/services/camera_exposure_mode_set.rb', line 21

def build_thing_product_camera_exposure_mode_set_services_reply_message(result: 0)
  message_data = {
    result: result
  }

  Thing::Product::CameraExposureModeSetServicesReplyMessage.new(
    bid: SecureRandom.uuid,
    tid: SecureRandom.uuid,
    timestamp: Message.current_timestamp,
    _method: "camera_exposure_mode_set",
    _data: message_data,
    data: message_data
  )
end

#build_thing_product_camera_exposure_set_services_message(data: build_thing_product_camera_exposure_set_services_message_data) ⇒ Object

Payload control - Camera exposure mode setting ###



7
8
9
10
11
# File 'lib/dji_mqtt_connect/factories/services/camera_exposure_set.rb', line 7

def build_thing_product_camera_exposure_set_services_message(data: build_thing_product_camera_exposure_set_services_message_data)
  Thing::Product::CameraExposureSetServicesMessage.build(
    data: data
  )
end

#build_thing_product_camera_exposure_set_services_message_dataObject



13
14
15
16
17
18
19
# File 'lib/dji_mqtt_connect/factories/services/camera_exposure_set.rb', line 13

def build_thing_product_camera_exposure_set_services_message_data
  {
    camera_type: Thing::Product::CameraExposureSetServicesMessage::CAMERA_TYPE_ZOOM,
    exposure_value: Thing::Product::CameraExposureSetServicesMessage::EXPOSURE_VALUE_FIXED,
    payload_index: "39-0-7"
  }
end

#build_thing_product_camera_exposure_set_services_reply_message(result: 0) ⇒ Object



21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/dji_mqtt_connect/factories/services/camera_exposure_set.rb', line 21

def build_thing_product_camera_exposure_set_services_reply_message(result: 0)
  message_data = {
    result: result
  }

  Thing::Product::CameraExposureSetServicesReplyMessage.new(
    bid: SecureRandom.uuid,
    tid: SecureRandom.uuid,
    timestamp: Message.current_timestamp,
    _method: "camera_exposure_set",
    _data: message_data,
    data: message_data
  )
end

#build_thing_product_camera_focal_length_set_services_message(data: build_thing_product_camera_focal_length_set_services_message_data) ⇒ Object

Payload control - Zoom ###



7
8
9
10
11
# File 'lib/dji_mqtt_connect/factories/services/camera_focal_length_set.rb', line 7

def build_thing_product_camera_focal_length_set_services_message(data: build_thing_product_camera_focal_length_set_services_message_data)
  Thing::Product::CameraFocalLengthSetServicesMessage.build(
    data: data
  )
end

#build_thing_product_camera_focal_length_set_services_message_dataObject



13
14
15
16
17
18
19
# File 'lib/dji_mqtt_connect/factories/services/camera_focal_length_set.rb', line 13

def build_thing_product_camera_focal_length_set_services_message_data
  {
    payload_index: "39-0-7",
    camera_type: Thing::Product::CameraFocalLengthSetServicesMessage::CAMERA_TYPE_WIDE,
    zoom_factor: 10.0
  }
end

#build_thing_product_camera_focal_length_set_services_reply_message(result: 0) ⇒ Object



21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/dji_mqtt_connect/factories/services/camera_focal_length_set.rb', line 21

def build_thing_product_camera_focal_length_set_services_reply_message(result: 0)
  message_data = {
    result: result
  }

  Thing::Product::CameraFocalLengthSetServicesReplyMessage.new(
    bid: SecureRandom.uuid,
    tid: SecureRandom.uuid,
    timestamp: Message.current_timestamp,
    _method: "camera_focal_length_set",
    _data: message_data,
    data: message_data
  )
end

#build_thing_product_camera_focus_mode_set_services_message(data: build_thing_product_camera_focus_mode_set_services_message_data) ⇒ Object

Payload control - Camera exposure mode setting ###



7
8
9
10
11
# File 'lib/dji_mqtt_connect/factories/services/camera_focus_mode_set.rb', line 7

def build_thing_product_camera_focus_mode_set_services_message(data: build_thing_product_camera_focus_mode_set_services_message_data)
  Thing::Product::CameraFocusModeSetServicesMessage.build(
    data: data
  )
end

#build_thing_product_camera_focus_mode_set_services_message_dataObject



13
14
15
16
17
18
19
# File 'lib/dji_mqtt_connect/factories/services/camera_focus_mode_set.rb', line 13

def build_thing_product_camera_focus_mode_set_services_message_data
  {
    camera_type: Thing::Product::CameraFocusModeSetServicesMessage::CAMERA_TYPE_ZOOM,
    focus_mode: Thing::Product::CameraFocusModeSetServicesMessage::FOCUS_MODE_MF,
    payload_index: "39-0-7"
  }
end

#build_thing_product_camera_focus_mode_set_services_reply_message(result: 0) ⇒ Object



21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/dji_mqtt_connect/factories/services/camera_focus_mode_set.rb', line 21

def build_thing_product_camera_focus_mode_set_services_reply_message(result: 0)
  message_data = {
    result: result
  }

  Thing::Product::CameraFocusModeSetServicesReplyMessage.new(
    bid: SecureRandom.uuid,
    tid: SecureRandom.uuid,
    timestamp: Message.current_timestamp,
    _method: "camera_focus_mode_set",
    _data: message_data,
    data: message_data
  )
end

#build_thing_product_camera_focus_value_set_services_message(data: build_thing_product_camera_focus_value_set_services_message_data) ⇒ Object

Payload control - Camera focus value setting ###



7
8
9
10
11
# File 'lib/dji_mqtt_connect/factories/services/camera_focus_value_set.rb', line 7

def build_thing_product_camera_focus_value_set_services_message(data: build_thing_product_camera_focus_value_set_services_message_data)
  Thing::Product::CameraFocusValueSetServicesMessage.build(
    data: data
  )
end

#build_thing_product_camera_focus_value_set_services_message_dataObject



13
14
15
16
17
18
19
# File 'lib/dji_mqtt_connect/factories/services/camera_focus_value_set.rb', line 13

def build_thing_product_camera_focus_value_set_services_message_data
  {
    camera_type: Thing::Product::CameraFocusValueSetServicesMessage::CAMERA_TYPE_ZOOM,
    focus_value: 10,
    payload_index: "39-0-7"
  }
end

#build_thing_product_camera_focus_value_set_services_reply_message(result: 0) ⇒ Object



21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/dji_mqtt_connect/factories/services/camera_focus_value_set.rb', line 21

def build_thing_product_camera_focus_value_set_services_reply_message(result: 0)
  message_data = {
    result: result
  }

  Thing::Product::CameraFocusValueSetServicesReplyMessage.new(
    bid: SecureRandom.uuid,
    tid: SecureRandom.uuid,
    timestamp: Message.current_timestamp,
    _method: "camera_focus_value_set",
    _data: message_data,
    data: message_data
  )
end

#build_thing_product_camera_frame_zoom_services_message(data: build_thing_product_camera_frame_zoom_services_message_data) ⇒ Object

Payload control - subject zoom



55
56
57
58
59
# File 'lib/dji_mqtt_connect/factories/services/live_control.rb', line 55

def build_thing_product_camera_frame_zoom_services_message(data: build_thing_product_camera_frame_zoom_services_message_data)
  Thing::Product::CameraFrameZoomServicesMessage.build(
    data: data
  )
end

#build_thing_product_camera_frame_zoom_services_message_dataObject



61
62
63
64
65
66
67
68
69
70
71
# File 'lib/dji_mqtt_connect/factories/services/live_control.rb', line 61

def build_thing_product_camera_frame_zoom_services_message_data
  {
    camera_type: "zoom",
    height: 0.2,
    locked: true,
    payload_index: "39-0-7",
    width: 0.2,
    x: 0.5,
    y: 0.5
  }
end

#build_thing_product_camera_frame_zoom_services_reply_message(result: 0) ⇒ Object



73
74
75
76
77
78
79
80
81
82
83
84
85
86
# File 'lib/dji_mqtt_connect/factories/services/live_control.rb', line 73

def build_thing_product_camera_frame_zoom_services_reply_message(result: 0)
  message_data = {
    result: result
  }

  Thing::Product::CameraFrameZoomServicesReplyMessage.new(
    bid: SecureRandom.uuid,
    tid: SecureRandom.uuid,
    timestamp: Message.current_timestamp,
    _method: "camera_frame_zoom",
    _data: message_data,
    data: message_data
  )
end

#build_thing_product_camera_look_at_services_message(data: build_thing_product_camera_look_at_services_message_data) ⇒ Object

Payload control - Reset gimbal ###



7
8
9
10
11
# File 'lib/dji_mqtt_connect/factories/services/camera_look_at.rb', line 7

def build_thing_product_camera_look_at_services_message(data: build_thing_product_camera_look_at_services_message_data)
  Thing::Product::CameraLookAtServicesMessage.build(
    data: data
  )
end

#build_thing_product_camera_look_at_services_message_dataObject



13
14
15
16
17
18
19
20
21
# File 'lib/dji_mqtt_connect/factories/services/camera_look_at.rb', line 13

def build_thing_product_camera_look_at_services_message_data
  {
    payload_index: "39-0-7",
    locked: true,
    latitude: "37.7749",
    longitude: "-122.4194",
    height: "100.0"
  }
end

#build_thing_product_camera_look_at_services_reply_message(result: 0) ⇒ Object



23
24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/dji_mqtt_connect/factories/services/camera_look_at.rb', line 23

def build_thing_product_camera_look_at_services_reply_message(result: 0)
  message_data = {
    result: result
  }

  Thing::Product::CameraLookAtServicesReplyMessage.new(
    bid: SecureRandom.uuid,
    tid: SecureRandom.uuid,
    timestamp: Message.current_timestamp,
    _method: "camera_look_at",
    _data: message_data,
    data: message_data
  )
end

#build_thing_product_camera_mode_switch_services_message(data: build_thing_product_camera_mode_switch_services_message_data) ⇒ Object

Payload control - Switch Camera Mode



7
8
9
10
11
# File 'lib/dji_mqtt_connect/factories/services/camera_mode_switch.rb', line 7

def build_thing_product_camera_mode_switch_services_message(data: build_thing_product_camera_mode_switch_services_message_data)
  Thing::Product::CameraModeSwitchServicesMessage.build(
    data: data
  )
end

#build_thing_product_camera_mode_switch_services_message_dataObject



13
14
15
16
17
18
# File 'lib/dji_mqtt_connect/factories/services/camera_mode_switch.rb', line 13

def build_thing_product_camera_mode_switch_services_message_data
  {
    camera_mode: 0,
    payload_index: "39-0-7"
  }
end

#build_thing_product_camera_mode_switch_services_reply_message(result: 0) ⇒ Object



20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/dji_mqtt_connect/factories/services/camera_mode_switch.rb', line 20

def build_thing_product_camera_mode_switch_services_reply_message(result: 0)
  message_data = {
    result: result
  }

  Thing::Product::CameraModeSwitchServicesReplyMessage.new(
    bid: SecureRandom.uuid,
    tid: SecureRandom.uuid,
    timestamp: Message.current_timestamp,
    _method: "camera_mode_switch",
    _data: message_data,
    data: message_data
  )
end

#build_thing_product_camera_photo_stop_services_message(payload_index: "39-0-7") ⇒ Object

Payload control - Stop capturing ###



7
8
9
10
11
12
13
14
15
# File 'lib/dji_mqtt_connect/factories/services/camera_photo_stop.rb', line 7

def build_thing_product_camera_photo_stop_services_message(payload_index: "39-0-7")
  message_data = {
    payload_index: payload_index
  }

  Thing::Product::CameraPhotoStopServicesMessage.build(
    data: message_data
  )
end

#build_thing_product_camera_photo_stop_services_reply_message(result: 0) ⇒ Object



17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/dji_mqtt_connect/factories/services/camera_photo_stop.rb', line 17

def build_thing_product_camera_photo_stop_services_reply_message(result: 0)
  message_data = {
    result: result
  }

  Thing::Product::CameraPhotoStopServicesReplyMessage.new(
    bid: SecureRandom.uuid,
    tid: SecureRandom.uuid,
    timestamp: Message.current_timestamp,
    _method: "camera_photo_stop",
    _data: message_data,
    data: message_data
  )
end

#build_thing_product_camera_photo_take_services_message(payload_index: "39-0-7") ⇒ Object

Payload control - Start capturing ###



7
8
9
10
11
12
13
14
15
# File 'lib/dji_mqtt_connect/factories/services/camera_photo_take.rb', line 7

def build_thing_product_camera_photo_take_services_message(payload_index: "39-0-7")
  message_data = {
    payload_index: payload_index
  }

  Thing::Product::CameraPhotoTakeServicesMessage.build(
    data: message_data
  )
end

#build_thing_product_camera_photo_take_services_reply_message(result: 0) ⇒ Object



17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/dji_mqtt_connect/factories/services/camera_photo_take.rb', line 17

def build_thing_product_camera_photo_take_services_reply_message(result: 0)
  message_data = {
    result: result
  }

  Thing::Product::CameraPhotoTakeServicesReplyMessage.new(
    bid: SecureRandom.uuid,
    tid: SecureRandom.uuid,
    timestamp: Message.current_timestamp,
    _method: "camera_photo_take",
    _data: message_data,
    data: message_data
  )
end

#build_thing_product_camera_point_focus_action_services_message(data: build_thing_product_camera_point_focus_action_services_message_data) ⇒ Object

Payload control - Spot AF ###



7
8
9
10
11
# File 'lib/dji_mqtt_connect/factories/services/camera_point_focus_action.rb', line 7

def build_thing_product_camera_point_focus_action_services_message(data: build_thing_product_camera_point_focus_action_services_message_data)
  Thing::Product::CameraPointFocusActionServicesMessage.build(
    data: data
  )
end

#build_thing_product_camera_point_focus_action_services_message_dataObject



13
14
15
16
17
18
19
20
# File 'lib/dji_mqtt_connect/factories/services/camera_point_focus_action.rb', line 13

def build_thing_product_camera_point_focus_action_services_message_data
  {
    camera_type: Thing::Product::CameraPointFocusActionServicesMessage::CAMERA_TYPE_ZOOM,
    x: 0.5,
    y: 0.5,
    payload_index: "39-0-7"
  }
end

#build_thing_product_camera_point_focus_action_services_reply_message(result: 0) ⇒ Object



22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/dji_mqtt_connect/factories/services/camera_point_focus_action.rb', line 22

def build_thing_product_camera_point_focus_action_services_reply_message(result: 0)
  message_data = {
    result: result
  }

  Thing::Product::CameraPointFocusActionServicesReplyMessage.new(
    bid: SecureRandom.uuid,
    tid: SecureRandom.uuid,
    timestamp: Message.current_timestamp,
    _method: "camera_point_focus_action",
    _data: message_data,
    data: message_data
  )
end

#build_thing_product_camera_recording_start_services_message(payload_index: "39-0-7") ⇒ Object

Payload control - Start capturing ###



7
8
9
10
11
12
13
14
15
# File 'lib/dji_mqtt_connect/factories/services/camera_recording_start.rb', line 7

def build_thing_product_camera_recording_start_services_message(payload_index: "39-0-7")
  message_data = {
    payload_index: payload_index
  }

  Thing::Product::CameraRecordingStartServicesMessage.build(
    data: message_data
  )
end

#build_thing_product_camera_recording_start_services_reply_message(result: 0) ⇒ Object



17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/dji_mqtt_connect/factories/services/camera_recording_start.rb', line 17

def build_thing_product_camera_recording_start_services_reply_message(result: 0)
  message_data = {
    result: result
  }

  Thing::Product::CameraRecordingStartServicesReplyMessage.new(
    bid: SecureRandom.uuid,
    tid: SecureRandom.uuid,
    timestamp: Message.current_timestamp,
    _method: "camera_recording_start",
    _data: message_data,
    data: message_data
  )
end

#build_thing_product_camera_recording_stop_services_message(payload_index: "39-0-7") ⇒ Object

Payload control - Stop Recording ###



7
8
9
10
11
12
13
14
15
# File 'lib/dji_mqtt_connect/factories/services/camera_recording_stop.rb', line 7

def build_thing_product_camera_recording_stop_services_message(payload_index: "39-0-7")
  message_data = {
    payload_index: payload_index
  }

  Thing::Product::CameraRecordingStopServicesMessage.build(
    data: message_data
  )
end

#build_thing_product_camera_recording_stop_services_reply_message(result: 0) ⇒ Object



17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/dji_mqtt_connect/factories/services/camera_recording_stop.rb', line 17

def build_thing_product_camera_recording_stop_services_reply_message(result: 0)
  message_data = {
    result: result
  }

  Thing::Product::CameraRecordingStopServicesReplyMessage.new(
    bid: SecureRandom.uuid,
    tid: SecureRandom.uuid,
    timestamp: Message.current_timestamp,
    _method: "camera_recording_stop",
    _data: message_data,
    data: message_data
  )
end

#build_thing_product_camera_screen_drag_services_message(data: build_thing_product_camera_screen_drag_services_message_data) ⇒ Object

Payload control - Screen Drag Control ###



7
8
9
10
11
# File 'lib/dji_mqtt_connect/factories/services/camera_screen_drag.rb', line 7

def build_thing_product_camera_screen_drag_services_message(data: build_thing_product_camera_screen_drag_services_message_data)
  Thing::Product::CameraScreenDragServicesMessage.build(
    data: data
  )
end

#build_thing_product_camera_screen_drag_services_message_dataObject



13
14
15
16
17
18
19
20
# File 'lib/dji_mqtt_connect/factories/services/camera_screen_drag.rb', line 13

def build_thing_product_camera_screen_drag_services_message_data
  {
    locked: true,
    payload_index: "39-0-7",
    pitch_speed: 0.1,
    yaw_speed: 0.1
  }
end

#build_thing_product_camera_screen_drag_services_reply_message(result: 0) ⇒ Object



22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/dji_mqtt_connect/factories/services/camera_screen_drag.rb', line 22

def build_thing_product_camera_screen_drag_services_reply_message(result: 0)
  message_data = {
    result: result
  }

  Thing::Product::CameraScreenDragServicesReplyMessage.new(
    bid: SecureRandom.uuid,
    tid: SecureRandom.uuid,
    timestamp: Message.current_timestamp,
    _method: "camera_screen_drag",
    _data: message_data,
    data: message_data
  )
end

#build_thing_product_camera_screen_split_services_message(data: build_thing_product_camera_screen_split_services_message_data) ⇒ Object

Payload control - Split Screen ###



7
8
9
10
11
# File 'lib/dji_mqtt_connect/factories/services/camera_screen_split.rb', line 7

def build_thing_product_camera_screen_split_services_message(data: build_thing_product_camera_screen_split_services_message_data)
  Thing::Product::CameraScreenSplitServicesMessage.build(
    data: data
  )
end

#build_thing_product_camera_screen_split_services_message_dataObject



13
14
15
16
17
18
# File 'lib/dji_mqtt_connect/factories/services/camera_screen_split.rb', line 13

def build_thing_product_camera_screen_split_services_message_data
  {
    payload_index: "39-0-7",
    enable: true
  }
end

#build_thing_product_camera_screen_split_services_reply_message(result: 0) ⇒ Object



20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/dji_mqtt_connect/factories/services/camera_screen_split.rb', line 20

def build_thing_product_camera_screen_split_services_reply_message(result: 0)
  message_data = {
    result: result
  }

  Thing::Product::CameraScreenSplitServicesReplyMessage.new(
    bid: SecureRandom.uuid,
    tid: SecureRandom.uuid,
    timestamp: Message.current_timestamp,
    _method: "camera_screen_split",
    _data: message_data,
    data: message_data
  )
end

#build_thing_product_charge_close_services_messageObject

Stop Charging ###



7
8
9
# File 'lib/dji_mqtt_connect/factories/services/charge_close.rb', line 7

def build_thing_product_charge_close_services_message
  Thing::Product::ChargeCloseServicesMessage.build
end

#build_thing_product_charge_close_services_reply_message(result: 0) ⇒ Object



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/dji_mqtt_connect/factories/services/charge_close.rb', line 11

def build_thing_product_charge_close_services_reply_message(result: 0)
  message_data = {
    result: result,
    output: {
      status: "ok"
    }
  }

  Thing::Product::ChargeCloseServicesReplyMessage.new(
    bid: SecureRandom.uuid,
    tid: SecureRandom.uuid,
    timestamp: Message.current_timestamp,
    _method: "charge_close",
    _data: message_data,
    data: message_data
  )
end

#build_thing_product_charge_open_services_messageObject

Stop Charging ###



7
8
9
# File 'lib/dji_mqtt_connect/factories/services/charge_open.rb', line 7

def build_thing_product_charge_open_services_message
  Thing::Product::ChargeOpenServicesMessage.build
end

#build_thing_product_charge_open_services_reply_message(result: 0) ⇒ Object



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/dji_mqtt_connect/factories/services/charge_open.rb', line 11

def build_thing_product_charge_open_services_reply_message(result: 0)
  message_data = {
    result: result,
    output: {
      status: "ok"
    }
  }

  Thing::Product::ChargeOpenServicesReplyMessage.new(
    bid: SecureRandom.uuid,
    tid: SecureRandom.uuid,
    timestamp: Message.current_timestamp,
    _method: "charge_open",
    _data: message_data,
    data: message_data
  )
end

#build_thing_product_cover_close_services_messageObject



9
10
11
# File 'lib/dji_mqtt_connect/factories/services_messages.rb', line 9

def build_thing_product_cover_close_services_message
  Thing::Product::CoverCloseServicesMessage.build
end

#build_thing_product_cover_force_close_services_messageObject

Force Close ###



7
8
9
# File 'lib/dji_mqtt_connect/factories/services/cover_force_close.rb', line 7

def build_thing_product_cover_force_close_services_message
  Thing::Product::CoverForceCloseServicesMessage.build
end

#build_thing_product_cover_force_close_services_reply_message(result: 0) ⇒ Object



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/dji_mqtt_connect/factories/services/cover_force_close.rb', line 11

def build_thing_product_cover_force_close_services_reply_message(result: 0)
  message_data = {
    result: result,
    output: {
      status: "ok"
    }
  }

  Thing::Product::CoverForceCloseServicesReplyMessage.new(
    bid: SecureRandom.uuid,
    tid: SecureRandom.uuid,
    timestamp: Message.current_timestamp,
    _method: "cover_force_close",
    _data: message_data,
    data: message_data
  )
end

#build_thing_product_cover_open_services_messageObject



13
14
15
# File 'lib/dji_mqtt_connect/factories/services_messages.rb', line 13

def build_thing_product_cover_open_services_message
  Thing::Product::CoverOpenServicesMessage.build
end

#build_thing_product_debug_mode_close_services_messageObject



17
18
19
# File 'lib/dji_mqtt_connect/factories/services_messages.rb', line 17

def build_thing_product_debug_mode_close_services_message
  Thing::Product::DebugModeCloseServicesMessage.build
end

#build_thing_product_debug_mode_open_services_messageObject



21
22
23
# File 'lib/dji_mqtt_connect/factories/services_messages.rb', line 21

def build_thing_product_debug_mode_open_services_message
  Thing::Product::DebugModeOpenServicesMessage.build
end

#build_thing_product_device_format_services_messageObject

Dock Data Formatting ###



7
8
9
# File 'lib/dji_mqtt_connect/factories/services/device_format.rb', line 7

def build_thing_product_device_format_services_message
  Thing::Product::DeviceFormatServicesMessage.build
end

#build_thing_product_device_format_services_reply_message(result: 0) ⇒ Object



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/dji_mqtt_connect/factories/services/device_format.rb', line 11

def build_thing_product_device_format_services_reply_message(result: 0)
  message_data = {
    result: result,
    output: {
      status: "ok"
    }
  }

  Thing::Product::DeviceFormatServicesReplyMessage.new(
    bid: SecureRandom.uuid,
    tid: SecureRandom.uuid,
    timestamp: Message.current_timestamp,
    _method: "device_format",
    _data: message_data,
    data: message_data
  )
end

#build_thing_product_device_reboot_services_messageObject

Dock Reboot ###



7
8
9
# File 'lib/dji_mqtt_connect/factories/services/device_reboot.rb', line 7

def build_thing_product_device_reboot_services_message
  Thing::Product::DeviceRebootServicesMessage.build
end

#build_thing_product_device_reboot_services_reply_message(result: 0) ⇒ Object



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/dji_mqtt_connect/factories/services/device_reboot.rb', line 11

def build_thing_product_device_reboot_services_reply_message(result: 0)
  message_data = {
    result: result,
    output: {
      status: "ok"
    }
  }

  Thing::Product::DeviceRebootServicesReplyMessage.new(
    bid: SecureRandom.uuid,
    tid: SecureRandom.uuid,
    timestamp: Message.current_timestamp,
    _method: "device_reboot",
    _data: message_data,
    data: message_data
  )
end

#build_thing_product_drc_mode_enter_services_message(data: build_thing_product_drc_mode_enter_services_message_data) ⇒ Object



5
6
7
8
9
# File 'lib/dji_mqtt_connect/factories/services/drc_mode_enter.rb', line 5

def build_thing_product_drc_mode_enter_services_message(data: build_thing_product_drc_mode_enter_services_message_data)
  Thing::Product::DrcModeEnterServicesMessage.build(
    data: data
  )
end

#build_thing_product_drc_mode_enter_services_message_dataObject



11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/dji_mqtt_connect/factories/services/drc_mode_enter.rb', line 11

def build_thing_product_drc_mode_enter_services_message_data
  {
    hsi_frequency: 1,
    mqtt_broker: {
      address: "mqtt.dji.com:8883",
      client_id: "sn_a",
      enable_tls: true,
      expire_time: 1672744922,
      password: "jwt_token",
      username: "sn_a_username"
    },
    osd_frequency: 10
  }
end

#build_thing_product_drc_mode_enter_services_reply_message(result: 0) ⇒ Object



26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/dji_mqtt_connect/factories/services/drc_mode_enter.rb', line 26

def build_thing_product_drc_mode_enter_services_reply_message(result: 0)
  message_data = {
    result: result
  }

  Thing::Product::DrcModeEnterServicesReplyMessage.new(
    bid: SecureRandom.uuid,
    tid: SecureRandom.uuid,
    timestamp: Message.current_timestamp,
    _method: "drc_mode_enter",
    _data: message_data,
    data: message_data
  )
end

#build_thing_product_drc_mode_exit_services_messageObject



5
6
7
# File 'lib/dji_mqtt_connect/factories/services/drc_mode_exit.rb', line 5

def build_thing_product_drc_mode_exit_services_message
  Thing::Product::DrcModeExitServicesMessage.build
end

#build_thing_product_drc_mode_exit_services_reply_message(result: 0) ⇒ Object



9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/dji_mqtt_connect/factories/services/drc_mode_exit.rb', line 9

def build_thing_product_drc_mode_exit_services_reply_message(result: 0)
  message_data = {
    result: result
  }

  Thing::Product::DrcModeExitServicesReplyMessage.new(
    bid: SecureRandom.uuid,
    tid: SecureRandom.uuid,
    timestamp: Message.current_timestamp,
    _method: "drc_mode_exit",
    _data: message_data,
    data: message_data
  )
end

#build_thing_product_drone_close_services_messageObject



25
26
27
# File 'lib/dji_mqtt_connect/factories/services_messages.rb', line 25

def build_thing_product_drone_close_services_message
  Thing::Product::DroneCloseServicesMessage.build
end

#build_thing_product_drone_format_services_messageObject

Aircraft Data Formatting ###



7
8
9
# File 'lib/dji_mqtt_connect/factories/services/drone_format.rb', line 7

def build_thing_product_drone_format_services_message
  Thing::Product::DroneFormatServicesMessage.build
end

#build_thing_product_drone_format_services_reply_message(result: 0) ⇒ Object



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/dji_mqtt_connect/factories/services/drone_format.rb', line 11

def build_thing_product_drone_format_services_reply_message(result: 0)
  message_data = {
    result: result,
    output: {
      status: "ok"
    }
  }

  Thing::Product::DroneFormatServicesReplyMessage.new(
    bid: SecureRandom.uuid,
    tid: SecureRandom.uuid,
    timestamp: Message.current_timestamp,
    _method: "drone_format",
    _data: message_data,
    data: message_data
  )
end

#build_thing_product_drone_open_services_messageObject



29
30
31
# File 'lib/dji_mqtt_connect/factories/services_messages.rb', line 29

def build_thing_product_drone_open_services_message
  Thing::Product::DroneOpenServicesMessage.build
end

#build_thing_product_esim_activate_services_messageObject

Activate eSIM ###



7
8
9
10
11
12
13
14
# File 'lib/dji_mqtt_connect/factories/services/esim_activate.rb', line 7

def build_thing_product_esim_activate_services_message
  Thing::Product::EsimActivateServicesMessage.build(
    data: {
      imei: "123456789012345",
      device_type: "dock"
    }
  )
end

#build_thing_product_esim_activate_services_reply_message(result: 0) ⇒ Object



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/dji_mqtt_connect/factories/services/esim_activate.rb', line 16

def build_thing_product_esim_activate_services_reply_message(result: 0)
  message_data = {
    result: result,
    output: {
      status: "ok"
    }
  }

  Thing::Product::EsimActivateServicesReplyMessage.new(
    bid: SecureRandom.uuid,
    tid: SecureRandom.uuid,
    timestamp: Message.current_timestamp,
    _method: "esim_activate",
    _data: message_data,
    data: message_data
  )
end

#build_thing_product_esim_operator_switch_services_messageObject

Switch eSIM Operator ###



7
8
9
10
11
12
13
14
15
# File 'lib/dji_mqtt_connect/factories/services/esim_operator_switch.rb', line 7

def build_thing_product_esim_operator_switch_services_message
  Thing::Product::EsimOperatorSwitchServicesMessage.build(
    data: {
      imei: "123456789012345",
      device_type: "dock",
      esim_operator: Thing::Product::EsimOperatorSwitchServicesMessage::ESIM_OPERATOR_CHINA_MOBILE
    }
  )
end

#build_thing_product_esim_operator_switch_services_reply_message(result: 0) ⇒ Object



17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/dji_mqtt_connect/factories/services/esim_operator_switch.rb', line 17

def build_thing_product_esim_operator_switch_services_reply_message(result: 0)
  message_data = {
    result: result
  }

  Thing::Product::EsimOperatorSwitchServicesReplyMessage.new(
    bid: SecureRandom.uuid,
    tid: SecureRandom.uuid,
    timestamp: Message.current_timestamp,
    _method: "esim_operator_switch",
    _data: message_data,
    data: message_data
  )
end

#build_thing_product_fileupload_list_services_messageObject



5
6
7
8
9
# File 'lib/dji_mqtt_connect/factories/services/fileupload_list.rb', line 5

def build_thing_product_fileupload_list_services_message
  Thing::Product::FileuploadListServicesMessage.build(
    module_list: [0, 3]
  )
end

#build_thing_product_fileupload_list_services_reply_message(result: 0) ⇒ Object



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# File 'lib/dji_mqtt_connect/factories/services/fileupload_list.rb', line 11

def build_thing_product_fileupload_list_services_reply_message(result: 0)
  timestamp = Message.current_timestamp
  message_data = {
    result: result,
    files: [
      {
        device_sn: "DRONESN",
        result: 0,
        module: Types::FILEUPLOAD_MODULE_AIRCRAFT,
        list: [
          {
            boot_index: 1111,
            start_time: timestamp - 4000,
            end_time: timestamp - 3000,
            size: 33789
          }
        ]
      },
      {
        device_sn: "DOCKSN",
        result: 0,
        module: Types::FILEUPLOAD_MODULE_DOCK,
        list: [
          {
            boot_index: 22222,
            start_time: timestamp - 2000,
            end_time: timestamp - 1000,
            size: 36772
          }
        ]
      }
    ]
  }

  Thing::Product::FileuploadListServicesReplyMessage.new(
    bid: Message.generate_bid,
    tid: Message.generate_tid,
    timestamp: timestamp,
    _method: "fileupload_list",
    _data: message_data,
    data: message_data
  )
end

#build_thing_product_fileupload_start_services_messageObject



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/dji_mqtt_connect/factories/services/fileupload_start.rb', line 5

def build_thing_product_fileupload_start_services_message
  timestamp = Message.current_timestamp
  Thing::Product::FileuploadStartServicesMessage.build(
    data: {
      bucket: "stg-dji-service-hz-ksd7",
      region: "hz",
      credentials: {
        access_key_id: "STS.access_key_id",
        access_key_secret: "access_key_secret",
        expire: 3600,
        security_token: "security_token"
      },
      endpoint: "https://oss-cn-hangzhou.aliyuncs.com",
      params: {
        files: [
          {
            list: [
              {
                boot_index: 1111,
                end_time: timestamp - 3000,
                size: 33789,
                start_time: timestamp - 4000
              },
              {
                boot_index: 22222,
                end_time: timestamp - 1000,
                size: 33789,
                start_time: timestamp - 2000
              }
            ],
            module: Types::FILEUPLOAD_MODULE_DOCK,
            object_key: "object_key"
          }
        ]
      },
      provider: "ali"
    }
  )
end

#build_thing_product_fileupload_start_services_reply_message(result: 0) ⇒ Object



45
46
47
48
49
50
51
52
53
54
55
56
# File 'lib/dji_mqtt_connect/factories/services/fileupload_start.rb', line 45

def build_thing_product_fileupload_start_services_reply_message(result: 0)
  message_data = {result: result}

  Thing::Product::FileuploadStartServicesReplyMessage.new(
    bid: Message.generate_bid,
    tid: Message.generate_tid,
    timestamp: Message.current_timestamp,
    _method: "fileupload_start",
    _data: message_data,
    data: message_data
  )
end

#build_thing_product_fileupload_update_services_messageObject



5
6
7
8
9
# File 'lib/dji_mqtt_connect/factories/services/fileupload_update.rb', line 5

def build_thing_product_fileupload_update_services_message
  Thing::Product::FileuploadUpdateServicesMessage.build(
    module_list: [0, 3]
  )
end

#build_thing_product_fileupload_update_services_reply_message(result: 0) ⇒ Object



11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/dji_mqtt_connect/factories/services/fileupload_update.rb', line 11

def build_thing_product_fileupload_update_services_reply_message(result: 0)
  message_data = {result: result}

  Thing::Product::FileuploadUpdateServicesReplyMessage.new(
    bid: Message.generate_bid,
    tid: Message.generate_tid,
    timestamp: Message.current_timestamp,
    _method: "fileupload_update",
    _data: message_data,
    data: message_data
  )
end

#build_thing_product_flight_authority_grab_services_messageObject

Flight Authority Grab ###



7
8
9
# File 'lib/dji_mqtt_connect/factories/services/live_control.rb', line 7

def build_thing_product_flight_authority_grab_services_message
  Thing::Product::FlightAuthorityGrabServicesMessage.build
end

#build_thing_product_flight_authority_grab_services_reply_message(result: 0) ⇒ Object



11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/dji_mqtt_connect/factories/services/live_control.rb', line 11

def build_thing_product_flight_authority_grab_services_reply_message(result: 0)
  message_data = {
    result: result
  }

  Thing::Product::FlightAuthorityGrabServicesReplyMessage.new(
    bid: SecureRandom.uuid,
    tid: SecureRandom.uuid,
    timestamp: Message.current_timestamp,
    _method: "flight_authority_grab",
    _data: message_data,
    data: message_data
  )
end

#build_thing_product_flighttask_execute_services_messageObject

Flighttask Execute ###



35
36
37
# File 'lib/dji_mqtt_connect/factories/services_messages.rb', line 35

def build_thing_product_flighttask_execute_services_message
  Thing::Product::FlighttaskExecuteServicesMessage.build(flight_id: SecureRandom.uuid)
end

#build_thing_product_flighttask_pause_services_messageObject



39
40
41
# File 'lib/dji_mqtt_connect/factories/services_messages.rb', line 39

def build_thing_product_flighttask_pause_services_message
  Thing::Product::FlighttaskPauseServicesMessage.build
end

#build_thing_product_flighttask_prepare_services_messageObject



43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# File 'lib/dji_mqtt_connect/factories/services_messages.rb', line 43

def build_thing_product_flighttask_prepare_services_message
  Thing::Product::FlighttaskPrepareServicesMessage.build(
    data: {
      execute_time: 1234567890123,
      flight_id: "xxxxxxx",
      task_type: 2,
      file: {
        url: "https://xxx.com/xxxx",
        fingerprint: "xxxx"
      },
      ready_conditions: {
        battery_capacity: 90,
        begin_time: 1234567890123,
        end_time: 1234567890123
      },
      executable_conditions: {
        storage_capacity: 1000
      },
      break_point: {
        index: 1,
        state: 0,
        progress: 0.34,
        wayline_id: 0
      },
      rth_altitude: 100,
      rth_mode: 1,
      out_of_control_action: 0,
      exit_wayline_when_rc_lost: 0,
      wayline_precision_type: 0
    }
  )
end

#build_thing_product_flighttask_progress_get_services_messageObject



80
81
82
83
84
85
86
# File 'lib/dji_mqtt_connect/factories/services_messages.rb', line 80

def build_thing_product_flighttask_progress_get_services_message
  Thing::Product::FlighttaskProgressGetServicesMessage.build(
    data: {
      sn: "SN1234567890"
    }
  )
end

#build_thing_product_flighttask_recovery_services_messageObject



76
77
78
# File 'lib/dji_mqtt_connect/factories/services_messages.rb', line 76

def build_thing_product_flighttask_recovery_services_message
  Thing::Product::FlighttaskRecoveryServicesMessage.build
end

#build_thing_product_flighttask_stop_services_messageObject



88
89
90
91
92
93
94
95
# File 'lib/dji_mqtt_connect/factories/services_messages.rb', line 88

def build_thing_product_flighttask_stop_services_message
  Thing::Product::FlighttaskStopServicesMessage.build(
    data: {
      flight_id: SecureRandom.uuid,
      reason: 0
    }
  )
end

#build_thing_product_flighttask_undo_services_messageObject



97
98
99
100
101
# File 'lib/dji_mqtt_connect/factories/services_messages.rb', line 97

def build_thing_product_flighttask_undo_services_message
  Thing::Product::FlighttaskUndoServicesMessage.build(
    flight_ids: [SecureRandom.uuid, SecureRandom.uuid]
  )
end

#build_thing_product_fly_to_point_services_messageObject

Fly to Point (Services Messages) ###



105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
# File 'lib/dji_mqtt_connect/factories/services_messages.rb', line 105

def build_thing_product_fly_to_point_services_message
  message_data = {
    fly_to_id: SecureRandom.uuid,
    points: [
      {
        latitude: 37.7749,
        longitude: -122.4194,
        height: 100
      }
    ],
    max_speed: 5
  }

  Thing::Product::FlyToPointServicesMessage.build(
    data: message_data
  )
end

#build_thing_product_fly_to_point_stop_services_messageObject



123
124
125
# File 'lib/dji_mqtt_connect/factories/services_messages.rb', line 123

def build_thing_product_fly_to_point_stop_services_message
  Thing::Product::FlyToPointStopServicesMessage.build
end

#build_thing_product_fly_to_point_update_services_messageObject



127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
# File 'lib/dji_mqtt_connect/factories/services_messages.rb', line 127

def build_thing_product_fly_to_point_update_services_message
  message_data = {
    points: [
      {
        latitude: 37.7750,
        longitude: -122.4195,
        height: 120
      }
    ],
    max_speed: 6
  }

  Thing::Product::FlyToPointUpdateServicesMessage.build(
    data: message_data
  )
end

#build_thing_product_gimbal_reset_services_message(data: build_thing_product_gimbal_reset_services_message_data) ⇒ Object

Payload control - Reset gimbal ###



7
8
9
10
11
# File 'lib/dji_mqtt_connect/factories/services/gimbal_reset.rb', line 7

def build_thing_product_gimbal_reset_services_message(data: build_thing_product_gimbal_reset_services_message_data)
  Thing::Product::GimbalResetServicesMessage.build(
    data: data
  )
end

#build_thing_product_gimbal_reset_services_message_dataObject



13
14
15
16
17
18
# File 'lib/dji_mqtt_connect/factories/services/gimbal_reset.rb', line 13

def build_thing_product_gimbal_reset_services_message_data
  {
    payload_index: "39-0-7",
    reset_mode: Thing::Product::GimbalResetServicesMessage::RESET_MODE_RESET
  }
end

#build_thing_product_gimbal_reset_services_reply_message(result: 0) ⇒ Object



20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/dji_mqtt_connect/factories/services/gimbal_reset.rb', line 20

def build_thing_product_gimbal_reset_services_reply_message(result: 0)
  message_data = {
    result: result
  }

  Thing::Product::GimbalResetServicesReplyMessage.new(
    bid: SecureRandom.uuid,
    tid: SecureRandom.uuid,
    timestamp: Message.current_timestamp,
    _method: "gimbal_reset",
    _data: message_data,
    data: message_data
  )
end

#build_thing_product_ir_metering_area_set_services_message(data: build_thing_product_ir_metering_area_set_services_message_data) ⇒ Object

Payload control - Infrared temperature measurement area setting ###



7
8
9
10
11
# File 'lib/dji_mqtt_connect/factories/services/ir_metering_area_set.rb', line 7

def build_thing_product_ir_metering_area_set_services_message(data: build_thing_product_ir_metering_area_set_services_message_data)
  Thing::Product::IrMeteringAreaSetServicesMessage.build(
    data: data
  )
end

#build_thing_product_ir_metering_area_set_services_message_dataObject



13
14
15
16
17
18
19
20
21
# File 'lib/dji_mqtt_connect/factories/services/ir_metering_area_set.rb', line 13

def build_thing_product_ir_metering_area_set_services_message_data
  {
    x: 0.5,
    y: 0.5,
    width: 0.3,
    height: 0.3,
    payload_index: "39-0-7"
  }
end

#build_thing_product_ir_metering_area_set_services_reply_message(result: 0) ⇒ Object



23
24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/dji_mqtt_connect/factories/services/ir_metering_area_set.rb', line 23

def build_thing_product_ir_metering_area_set_services_reply_message(result: 0)
  message_data = {
    result: result
  }

  Thing::Product::IrMeteringAreaSetServicesReplyMessage.new(
    bid: SecureRandom.uuid,
    tid: SecureRandom.uuid,
    timestamp: Message.current_timestamp,
    _method: "ir_metering_area_set",
    _data: message_data,
    data: message_data
  )
end

#build_thing_product_ir_metering_mode_set_services_message(data: build_thing_product_ir_metering_mode_set_services_message_data) ⇒ Object

Payload control - Infrared temperature measurement mode setting ###



7
8
9
10
11
# File 'lib/dji_mqtt_connect/factories/services/ir_metering_mode_set.rb', line 7

def build_thing_product_ir_metering_mode_set_services_message(data: build_thing_product_ir_metering_mode_set_services_message_data)
  Thing::Product::IrMeteringModeSetServicesMessage.build(
    data: data
  )
end

#build_thing_product_ir_metering_mode_set_services_message_dataObject



13
14
15
16
17
18
# File 'lib/dji_mqtt_connect/factories/services/ir_metering_mode_set.rb', line 13

def build_thing_product_ir_metering_mode_set_services_message_data
  {
    mode: Types::IR_METERING_MODE_POINT,
    payload_index: "39-0-7"
  }
end

#build_thing_product_ir_metering_mode_set_services_reply_message(result: 0) ⇒ Object



20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/dji_mqtt_connect/factories/services/ir_metering_mode_set.rb', line 20

def build_thing_product_ir_metering_mode_set_services_reply_message(result: 0)
  message_data = {
    result: result
  }

  Thing::Product::IrMeteringModeSetServicesReplyMessage.new(
    bid: SecureRandom.uuid,
    tid: SecureRandom.uuid,
    timestamp: Message.current_timestamp,
    _method: "ir_metering_mode_set",
    _data: message_data,
    data: message_data
  )
end

#build_thing_product_ir_metering_point_set_services_message(data: build_thing_product_ir_metering_point_set_services_message_data) ⇒ Object

Payload control - Infrared temperature measurement point setting ###



7
8
9
10
11
# File 'lib/dji_mqtt_connect/factories/services/ir_metering_point_set.rb', line 7

def build_thing_product_ir_metering_point_set_services_message(data: build_thing_product_ir_metering_point_set_services_message_data)
  Thing::Product::IrMeteringPointSetServicesMessage.build(
    data: data
  )
end

#build_thing_product_ir_metering_point_set_services_message_dataObject



13
14
15
16
17
18
19
# File 'lib/dji_mqtt_connect/factories/services/ir_metering_point_set.rb', line 13

def build_thing_product_ir_metering_point_set_services_message_data
  {
    x: 0.5,
    y: 0.5,
    payload_index: "39-0-7"
  }
end

#build_thing_product_ir_metering_point_set_services_reply_message(result: 0) ⇒ Object



21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/dji_mqtt_connect/factories/services/ir_metering_point_set.rb', line 21

def build_thing_product_ir_metering_point_set_services_reply_message(result: 0)
  message_data = {
    result: result
  }

  Thing::Product::IrMeteringPointSetServicesReplyMessage.new(
    bid: SecureRandom.uuid,
    tid: SecureRandom.uuid,
    timestamp: Message.current_timestamp,
    _method: "ir_metering_point_set",
    _data: message_data,
    data: message_data
  )
end

#build_thing_product_live_camera_change_services_messageObject

Live Stream (Services Messages) ###



146
147
148
149
150
151
152
153
# File 'lib/dji_mqtt_connect/factories/services_messages.rb', line 146

def build_thing_product_live_camera_change_services_message
  Thing::Product::LiveCameraChangeServicesMessage.build(
    data: {
      video_id: "1ZNDH1D0010098/165-0-7/normal-0",
      camera_position: 0
    }
  )
end

#build_thing_product_live_lens_change_services_messageObject



155
156
157
158
159
160
161
162
# File 'lib/dji_mqtt_connect/factories/services_messages.rb', line 155

def build_thing_product_live_lens_change_services_message
  Thing::Product::LiveLensChangeServicesMessage.build(
    data: {
      video_id: "1ZNDH1D0010098/39-0-7/normal-0",
      video_type: "wide"
    }
  )
end

#build_thing_product_live_set_quality_services_messageObject



164
165
166
167
168
169
170
171
# File 'lib/dji_mqtt_connect/factories/services_messages.rb', line 164

def build_thing_product_live_set_quality_services_message
  Thing::Product::LiveSetQualityServicesMessage.build(
    data: {
      video_id: "1ZNDH1D0010098/39-0-7/normal-0",
      video_quality: 0
    }
  )
end

#build_thing_product_live_start_push_services_messageObject



173
174
175
176
177
178
179
180
181
182
# File 'lib/dji_mqtt_connect/factories/services_messages.rb', line 173

def build_thing_product_live_start_push_services_message
  Thing::Product::LiveStartPushServicesMessage.build(
    data: {
      url: "channel=1ZNDH1D0010098_39-0-7&sn=1ZNDH1D0010098&token=006dca67721582a48768ec4d817b7b25a86IADk%2Fcm%2Fdv%2BHY6qT%2FAKM6y7TcUe4lXNvZpycH7vUMAlM6pFALUKF2zyCIgA82pQE8cCoYAQAAQDxwKhgAgDxwKhgAwDxwKhgBADxwKhg&uid=50000",
      url_type: 0,
      video_id: "1ZNDH1D0010098/39-0-7/normal-0",
      video_quality: 0
    }
  )
end

#build_thing_product_live_stop_push_services_messageObject



184
185
186
187
188
189
190
# File 'lib/dji_mqtt_connect/factories/services_messages.rb', line 184

def build_thing_product_live_stop_push_services_message
  Thing::Product::LiveStopPushServicesMessage.build(
    data: {
      video_id: "1ZNDH1D0010098/39-0-7/normal-0"
    }
  )
end

#build_thing_product_ota_create_services_message(data: build_thing_product_ota_create_services_message_data) ⇒ Object



5
6
7
8
9
# File 'lib/dji_mqtt_connect/factories/services/ota_create.rb', line 5

def build_thing_product_ota_create_services_message(data: build_thing_product_ota_create_services_message_data)
  Thing::Product::OtaCreateServicesMessage.build(
    data: data
  )
end

#build_thing_product_ota_create_services_message_dataObject



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/dji_mqtt_connect/factories/services/ota_create.rb', line 11

def build_thing_product_ota_create_services_message_data
  {
    devices: [
      {
        file_name: "wm245_1.00.223.zip",
        file_size: 653467234,
        file_url: "https://s3.com/xxx.zip",
        firmware_upgrade_type: 2,
        md5: "abcdefabcdefabcdef",
        product_version: "1.00.223",
        sn: "DRONESN"
      },
      {
        firmware_upgrade_type: 3,
        product_version: "1.00.223",
        sn: "DOCKSN"
      }
    ]
  }
end

#build_thing_product_ota_create_services_reply_message(status: "ok", result: 0) ⇒ Object



32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/dji_mqtt_connect/factories/services/ota_create.rb', line 32

def build_thing_product_ota_create_services_reply_message(status: "ok", result: 0)
  message_data = {
    status: status,
    result: result
  }

  Thing::Product::OtaCreateServicesReplyMessage.new(
    bid: SecureRandom.uuid,
    tid: SecureRandom.uuid,
    timestamp: Message.current_timestamp,
    _method: "ota_create",
    _data: message_data,
    data: message_data
  )
end

#build_thing_product_payload_authority_grab_services_message(payload_index: "39-0-7") ⇒ Object

Payload Authority Grab ###



28
29
30
31
32
33
34
35
36
# File 'lib/dji_mqtt_connect/factories/services/live_control.rb', line 28

def build_thing_product_payload_authority_grab_services_message(payload_index: "39-0-7")
  message_data = {
    payload_index: payload_index
  }

  Thing::Product::PayloadAuthorityGrabServicesMessage.build(
    data: message_data
  )
end

#build_thing_product_payload_authority_grab_services_reply_message(result: 0) ⇒ Object



38
39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/dji_mqtt_connect/factories/services/live_control.rb', line 38

def build_thing_product_payload_authority_grab_services_reply_message(result: 0)
  message_data = {
    result: result
  }

  Thing::Product::PayloadAuthorityGrabServicesReplyMessage.new(
    bid: SecureRandom.uuid,
    tid: SecureRandom.uuid,
    timestamp: Message.current_timestamp,
    _method: "payload_authority_grab",
    _data: message_data,
    data: message_data
  )
end

#build_thing_product_photo_storage_set_services_message(data: build_thing_product_photo_storage_set_services_message_data) ⇒ Object

Payload control - Photo storage settings ###



7
8
9
10
11
# File 'lib/dji_mqtt_connect/factories/services/photo_storage_set.rb', line 7

def build_thing_product_photo_storage_set_services_message(data: build_thing_product_photo_storage_set_services_message_data)
  Thing::Product::PhotoStorageSetServicesMessage.build(
    data: data
  )
end

#build_thing_product_photo_storage_set_services_message_dataObject



13
14
15
16
17
18
19
20
21
22
# File 'lib/dji_mqtt_connect/factories/services/photo_storage_set.rb', line 13

def build_thing_product_photo_storage_set_services_message_data
  {
    payload_index: "39-0-7",
    photo_storage_settings: [
      "current",
      "vision",
      "ir"
    ]
  }
end

#build_thing_product_photo_storage_set_services_reply_message(result: 0) ⇒ Object



24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/dji_mqtt_connect/factories/services/photo_storage_set.rb', line 24

def build_thing_product_photo_storage_set_services_reply_message(result: 0)
  message_data = {
    result: result
  }

  Thing::Product::PhotoStorageSetServicesReplyMessage.new(
    bid: SecureRandom.uuid,
    tid: SecureRandom.uuid,
    timestamp: Message.current_timestamp,
    _method: "photo_storage_set",
    _data: message_data,
    data: message_data
  )
end

#build_thing_product_return_home_cancel_services_messageObject



196
197
198
# File 'lib/dji_mqtt_connect/factories/services_messages.rb', line 196

def build_thing_product_return_home_cancel_services_message
  Thing::Product::ReturnHomeCancelServicesMessage.build
end

#build_thing_product_return_home_services_messageObject



192
193
194
# File 'lib/dji_mqtt_connect/factories/services_messages.rb', line 192

def build_thing_product_return_home_services_message
  Thing::Product::ReturnHomeServicesMessage.build
end

#build_thing_product_return_specific_home_services_message(home_dock_sn: "SN1234567890") ⇒ Object



200
201
202
# File 'lib/dji_mqtt_connect/factories/services_messages.rb', line 200

def build_thing_product_return_specific_home_services_message(home_dock_sn: "SN1234567890")
  Thing::Product::ReturnSpecificHomeServicesMessage.build(home_dock_sn: home_dock_sn)
end

#build_thing_product_rtk_calibration_services_messageObject

RTK Calibration ###



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/dji_mqtt_connect/factories/services/rtk_calibration.rb', line 7

def build_thing_product_rtk_calibration_services_message
  Thing::Product::RtkCalibrationServicesMessage.build(
    devices: [
      {
        sn: "DOCKSN",
        type: Thing::Product::RtkCalibrationServicesMessage::DEVICE_TYPE_MANUAL_CALIBRATION,
        module: "3",
        data: {
          longitude: 114.898281,
          latitude: 22.755022,
          height: 60.285194
        }
      }
    ]
  )
end

#build_thing_product_rtk_calibration_services_reply_message(result: 0) ⇒ Object



24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/dji_mqtt_connect/factories/services/rtk_calibration.rb', line 24

def build_thing_product_rtk_calibration_services_reply_message(result: 0)
  message_data = {
    result: result,
    output: {
      status: "ok"
    }
  }

  Thing::Product::RtkCalibrationServicesReplyMessage.new(
    bid: SecureRandom.uuid,
    tid: SecureRandom.uuid,
    timestamp: Message.current_timestamp,
    _method: "rtk_calibration",
    _data: message_data,
    data: message_data
  )
end

#build_thing_product_sdr_workmode_switch_services_messageObject

Enhanced Image Transmission Switch ###



7
8
9
# File 'lib/dji_mqtt_connect/factories/services/sdr_workmode_switch.rb', line 7

def build_thing_product_sdr_workmode_switch_services_message
  Thing::Product::SdrWorkmodeSwitchServicesMessage.build(link_workmode: Thing::Product::SdrWorkmodeSwitchServicesMessage::LINK_WORKMODE_4G_ENHANCED)
end

#build_thing_product_sdr_workmode_switch_services_reply_message(result: 0) ⇒ Object



11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/dji_mqtt_connect/factories/services/sdr_workmode_switch.rb', line 11

def build_thing_product_sdr_workmode_switch_services_reply_message(result: 0)
  message_data = {
    result: result
  }

  Thing::Product::SdrWorkmodeSwitchServicesReplyMessage.new(
    bid: SecureRandom.uuid,
    tid: SecureRandom.uuid,
    timestamp: Message.current_timestamp,
    _method: "sdr_workmode_switch",
    _data: message_data,
    data: message_data
  )
end

#build_thing_product_sim_slot_switch_services_messageObject

Switch Between eSIM and SIM ###



7
8
9
10
11
12
13
14
15
# File 'lib/dji_mqtt_connect/factories/services/sim_slot_switch.rb', line 7

def build_thing_product_sim_slot_switch_services_message
  Thing::Product::SimSlotSwitchServicesMessage.build(
    data: {
      imei: "123456789012345",
      device_type: "dock",
      sim_slot: Thing::Product::SimSlotSwitchServicesMessage::SIM_SLOT_ESIM
    }
  )
end

#build_thing_product_sim_slot_switch_services_reply_message(result: 0) ⇒ Object



17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/dji_mqtt_connect/factories/services/sim_slot_switch.rb', line 17

def build_thing_product_sim_slot_switch_services_reply_message(result: 0)
  message_data = {
    result: result
  }

  Thing::Product::SimSlotSwitchServicesReplyMessage.new(
    bid: SecureRandom.uuid,
    tid: SecureRandom.uuid,
    timestamp: Message.current_timestamp,
    _method: "sim_slot_switch",
    _data: message_data,
    data: message_data
  )
end

#build_thing_product_supplement_light_close_services_messageObject

Disable Auxiliary Light ###



7
8
9
# File 'lib/dji_mqtt_connect/factories/services/supplement_light_close.rb', line 7

def build_thing_product_supplement_light_close_services_message
  Thing::Product::SupplementLightCloseServicesMessage.build
end

#build_thing_product_supplement_light_close_services_reply_message(result: 0) ⇒ Object



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/dji_mqtt_connect/factories/services/supplement_light_close.rb', line 11

def build_thing_product_supplement_light_close_services_reply_message(result: 0)
  message_data = {
    result: result,
    output: {
      status: "ok"
    }
  }

  Thing::Product::SupplementLightCloseServicesReplyMessage.new(
    bid: SecureRandom.uuid,
    tid: SecureRandom.uuid,
    timestamp: Message.current_timestamp,
    _method: "supplement_light_close",
    _data: message_data,
    data: message_data
  )
end

#build_thing_product_supplement_light_open_services_messageObject

Enable Auxiliary Light ###



7
8
9
# File 'lib/dji_mqtt_connect/factories/services/supplement_light_open.rb', line 7

def build_thing_product_supplement_light_open_services_message
  Thing::Product::SupplementLightOpenServicesMessage.build
end

#build_thing_product_supplement_light_open_services_reply_message(result: 0) ⇒ Object



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/dji_mqtt_connect/factories/services/supplement_light_open.rb', line 11

def build_thing_product_supplement_light_open_services_reply_message(result: 0)
  message_data = {
    result: result,
    output: {
      status: "ok"
    }
  }

  Thing::Product::SupplementLightOpenServicesReplyMessage.new(
    bid: SecureRandom.uuid,
    tid: SecureRandom.uuid,
    timestamp: Message.current_timestamp,
    _method: "supplement_light_open",
    _data: message_data,
    data: message_data
  )
end

#build_thing_product_takeoff_to_point_services_messageObject

Takeoff to Point (Services Messages) ###



206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
# File 'lib/dji_mqtt_connect/factories/services_messages.rb', line 206

def build_thing_product_takeoff_to_point_services_message
  message_data = {
    flight_id: SecureRandom.uuid,
    target_latitude: 37.7749,
    target_longitude: -122.4194,
    target_height: 100,
    max_speed: 5,
    rth_mode: 1,
    rth_altitude: 30,
    security_takeoff_height: 10,
    rc_lost_action: 1,
    commander_mode_lost_action: 0,
    commander_flight_mode: 1,
    commander_flight_height: 50,
    flight_safety_advance_check: 1
  }

  Thing::Product::TakeoffToPointServicesMessage.build(
    data: message_data
  )
end

#build_thing_product_takeoff_to_point_services_reply_messageObject



228
229
230
231
232
233
234
235
236
237
238
239
240
241
# File 'lib/dji_mqtt_connect/factories/services_messages.rb', line 228

def build_thing_product_takeoff_to_point_services_reply_message
  message_data = {
    result: 0
  }

  Thing::Product::TakeoffToPointServicesReplyMessage.new(
    bid: Message.generate_bid,
    tid: Message.generate_tid,
    timestamp: Message.current_timestamp,
    _method: "takeoff_to_point",
    _data: message_data,
    data: message_data
  )
end

#build_thing_product_video_storage_set_services_message(data: build_thing_product_video_storage_set_services_message_data) ⇒ Object

Payload control - Video storage settings ###



7
8
9
10
11
# File 'lib/dji_mqtt_connect/factories/services/video_storage_set.rb', line 7

def build_thing_product_video_storage_set_services_message(data: build_thing_product_video_storage_set_services_message_data)
  Thing::Product::VideoStorageSetServicesMessage.build(
    data: data
  )
end

#build_thing_product_video_storage_set_services_message_dataObject



13
14
15
16
17
18
19
20
21
22
# File 'lib/dji_mqtt_connect/factories/services/video_storage_set.rb', line 13

def build_thing_product_video_storage_set_services_message_data
  {
    payload_index: "39-0-7",
    video_storage_settings: [
      "current",
      "vision",
      "ir"
    ]
  }
end

#build_thing_product_video_storage_set_services_reply_message(result: 0) ⇒ Object



24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/dji_mqtt_connect/factories/services/video_storage_set.rb', line 24

def build_thing_product_video_storage_set_services_reply_message(result: 0)
  message_data = {
    result: result
  }

  Thing::Product::VideoStorageSetServicesReplyMessage.new(
    bid: SecureRandom.uuid,
    tid: SecureRandom.uuid,
    timestamp: Message.current_timestamp,
    _method: "video_storage_set",
    _data: message_data,
    data: message_data
  )
end