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/gimbal_reset.rb,
lib/dji_mqtt_connect/factories/services/live_control.rb,
lib/dji_mqtt_connect/factories/services/drc_mode_exit.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/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/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/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/camera_focus_value_set.rb,
lib/dji_mqtt_connect/factories/services/camera_recording_start.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/camera_point_focus_action.rb
Instance Method Summary collapse
- #build_thing_product_alarm_state_switch_services_message ⇒ Object
-
#build_thing_product_camera_aim_services_message(data: build_thing_product_camera_aim_services_message_data) ⇒ Object
Payload control - Double tap to AIM ###.
- #build_thing_product_camera_aim_services_message_data ⇒ Object
- #build_thing_product_camera_aim_services_reply_message(result: 0) ⇒ Object
-
#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 ###.
- #build_thing_product_camera_exposure_mode_set_services_message_data ⇒ Object
- #build_thing_product_camera_exposure_mode_set_services_reply_message(result: 0) ⇒ Object
-
#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 ###.
- #build_thing_product_camera_exposure_set_services_message_data ⇒ Object
- #build_thing_product_camera_exposure_set_services_reply_message(result: 0) ⇒ Object
-
#build_thing_product_camera_focal_length_set_services_message(data: build_thing_product_camera_focal_length_set_services_message_data) ⇒ Object
Payload control - Zoom ###.
- #build_thing_product_camera_focal_length_set_services_message_data ⇒ Object
- #build_thing_product_camera_focal_length_set_services_reply_message(result: 0) ⇒ Object
-
#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 ###.
- #build_thing_product_camera_focus_mode_set_services_message_data ⇒ Object
- #build_thing_product_camera_focus_mode_set_services_reply_message(result: 0) ⇒ Object
-
#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 ###.
- #build_thing_product_camera_focus_value_set_services_message_data ⇒ Object
- #build_thing_product_camera_focus_value_set_services_reply_message(result: 0) ⇒ Object
-
#build_thing_product_camera_frame_zoom_services_message(data: build_thing_product_camera_frame_zoom_services_message_data) ⇒ Object
Payload control - subject zoom.
- #build_thing_product_camera_frame_zoom_services_message_data ⇒ Object
- #build_thing_product_camera_frame_zoom_services_reply_message(result: 0) ⇒ Object
-
#build_thing_product_camera_look_at_services_message(data: build_thing_product_camera_look_at_services_message_data) ⇒ Object
Payload control - Reset gimbal ###.
- #build_thing_product_camera_look_at_services_message_data ⇒ Object
- #build_thing_product_camera_look_at_services_reply_message(result: 0) ⇒ Object
-
#build_thing_product_camera_mode_switch_services_message(data: build_thing_product_camera_mode_switch_services_message_data) ⇒ Object
Payload control - Switch Camera Mode.
- #build_thing_product_camera_mode_switch_services_message_data ⇒ Object
- #build_thing_product_camera_mode_switch_services_reply_message(result: 0) ⇒ Object
-
#build_thing_product_camera_photo_stop_services_message(payload_index: "39-0-7") ⇒ Object
Payload control - Stop capturing ###.
- #build_thing_product_camera_photo_stop_services_reply_message(result: 0) ⇒ Object
-
#build_thing_product_camera_photo_take_services_message(payload_index: "39-0-7") ⇒ Object
Payload control - Start capturing ###.
- #build_thing_product_camera_photo_take_services_reply_message(result: 0) ⇒ Object
-
#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 ###.
- #build_thing_product_camera_point_focus_action_services_message_data ⇒ Object
- #build_thing_product_camera_point_focus_action_services_reply_message(result: 0) ⇒ Object
-
#build_thing_product_camera_recording_start_services_message(payload_index: "39-0-7") ⇒ Object
Payload control - Start capturing ###.
- #build_thing_product_camera_recording_start_services_reply_message(result: 0) ⇒ Object
-
#build_thing_product_camera_recording_stop_services_message(payload_index: "39-0-7") ⇒ Object
Payload control - Stop Recording ###.
- #build_thing_product_camera_recording_stop_services_reply_message(result: 0) ⇒ Object
-
#build_thing_product_camera_screen_drag_services_message(data: build_thing_product_camera_screen_drag_services_message_data) ⇒ Object
Payload control - Screen Drag Control ###.
- #build_thing_product_camera_screen_drag_services_message_data ⇒ Object
- #build_thing_product_camera_screen_drag_services_reply_message(result: 0) ⇒ Object
-
#build_thing_product_camera_screen_split_services_message(data: build_thing_product_camera_screen_split_services_message_data) ⇒ Object
Payload control - Split Screen ###.
- #build_thing_product_camera_screen_split_services_message_data ⇒ Object
- #build_thing_product_camera_screen_split_services_reply_message(result: 0) ⇒ Object
-
#build_thing_product_charge_close_services_message ⇒ Object
Stop Charging ###.
- #build_thing_product_charge_close_services_reply_message(result: 0) ⇒ Object
-
#build_thing_product_charge_open_services_message ⇒ Object
Stop Charging ###.
- #build_thing_product_charge_open_services_reply_message(result: 0) ⇒ Object
- #build_thing_product_cover_close_services_message ⇒ Object
-
#build_thing_product_cover_force_close_services_message ⇒ Object
Force Close ###.
- #build_thing_product_cover_force_close_services_reply_message(result: 0) ⇒ Object
- #build_thing_product_cover_open_services_message ⇒ Object
- #build_thing_product_debug_mode_close_services_message ⇒ Object
- #build_thing_product_debug_mode_open_services_message ⇒ Object
- #build_thing_product_drc_mode_enter_services_message(data: build_thing_product_drc_mode_enter_services_message_data) ⇒ Object
- #build_thing_product_drc_mode_enter_services_message_data ⇒ Object
- #build_thing_product_drc_mode_enter_services_reply_message(result: 0) ⇒ Object
- #build_thing_product_drc_mode_exit_services_message ⇒ Object
- #build_thing_product_drc_mode_exit_services_reply_message(result: 0) ⇒ Object
- #build_thing_product_drone_close_services_message ⇒ Object
- #build_thing_product_drone_open_services_message ⇒ Object
- #build_thing_product_fileupload_list_services_message ⇒ Object
- #build_thing_product_fileupload_start_services_message ⇒ Object
-
#build_thing_product_flight_authority_grab_services_message ⇒ Object
Flight Authority Grab ###.
- #build_thing_product_flight_authority_grab_services_reply_message(result: 0) ⇒ Object
-
#build_thing_product_flighttask_execute_services_message ⇒ Object
Flighttask Execute ###.
- #build_thing_product_flighttask_pause_services_message ⇒ Object
- #build_thing_product_flighttask_prepare_services_message ⇒ Object
- #build_thing_product_flighttask_progress_get_services_message ⇒ Object
- #build_thing_product_flighttask_recovery_services_message ⇒ Object
- #build_thing_product_flighttask_stop_services_message ⇒ Object
- #build_thing_product_flighttask_undo_services_message ⇒ Object
-
#build_thing_product_fly_to_point_services_message ⇒ Object
Fly to Point (Services Messages) ###.
- #build_thing_product_fly_to_point_stop_services_message ⇒ Object
- #build_thing_product_fly_to_point_update_services_message ⇒ Object
-
#build_thing_product_gimbal_reset_services_message(data: build_thing_product_gimbal_reset_services_message_data) ⇒ Object
Payload control - Reset gimbal ###.
- #build_thing_product_gimbal_reset_services_message_data ⇒ Object
- #build_thing_product_gimbal_reset_services_reply_message(result: 0) ⇒ Object
-
#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 ###.
- #build_thing_product_ir_metering_area_set_services_message_data ⇒ Object
- #build_thing_product_ir_metering_area_set_services_reply_message(result: 0) ⇒ Object
-
#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 ###.
- #build_thing_product_ir_metering_mode_set_services_message_data ⇒ Object
- #build_thing_product_ir_metering_mode_set_services_reply_message(result: 0) ⇒ Object
-
#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 ###.
- #build_thing_product_ir_metering_point_set_services_message_data ⇒ Object
- #build_thing_product_ir_metering_point_set_services_reply_message(result: 0) ⇒ Object
-
#build_thing_product_live_lens_change_services_message ⇒ Object
Live Stream (Services Messages) ###.
- #build_thing_product_live_set_quality_services_message ⇒ Object
- #build_thing_product_live_start_push_services_message ⇒ Object
- #build_thing_product_live_stop_push_services_message ⇒ Object
- #build_thing_product_ota_create_services_message(data: build_thing_product_ota_create_services_message_data) ⇒ Object
- #build_thing_product_ota_create_services_message_data ⇒ Object
- #build_thing_product_ota_create_services_reply_message(status: "ok", result: 0) ⇒ Object
-
#build_thing_product_payload_authority_grab_services_message(payload_index: "39-0-7") ⇒ Object
Payload Authority Grab ###.
- #build_thing_product_payload_authority_grab_services_reply_message(result: 0) ⇒ Object
-
#build_thing_product_photo_storage_set_services_message(data: build_thing_product_photo_storage_set_services_message_data) ⇒ Object
Payload control - Photo storage settings ###.
- #build_thing_product_photo_storage_set_services_message_data ⇒ Object
- #build_thing_product_photo_storage_set_services_reply_message(result: 0) ⇒ Object
- #build_thing_product_return_home_cancel_services_message ⇒ Object
- #build_thing_product_return_home_services_message ⇒ Object
- #build_thing_product_return_specific_home_services_message(home_dock_sn: "SN1234567890") ⇒ Object
-
#build_thing_product_takeoff_to_point_services_message ⇒ Object
Takeoff to Point (Services Messages) ###.
- #build_thing_product_takeoff_to_point_services_reply_message ⇒ Object
-
#build_thing_product_video_storage_set_services_message(data: build_thing_product_video_storage_set_services_message_data) ⇒ Object
Payload control - Video storage settings ###.
- #build_thing_product_video_storage_set_services_message_data ⇒ Object
- #build_thing_product_video_storage_set_services_reply_message(result: 0) ⇒ Object
Instance Method Details
#build_thing_product_alarm_state_switch_services_message ⇒ Object
5 6 7 |
# File 'lib/dji_mqtt_connect/factories/services_messages.rb', line 5 def Thing::Product::AlarmStateSwitchServicesMessage.build(action: Thing::Product::AlarmStateSwitchServicesMessage::ACTION_OPEN) 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 (data: ) Thing::Product::CameraAimServicesMessage.build( data: data ) end |
#build_thing_product_camera_aim_services_message_data ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/dji_mqtt_connect/factories/services/camera_aim.rb', line 13 def { 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 (result: 0) = { result: result } Thing::Product::CameraAimServicesReplyMessage.new( bid: SecureRandom.uuid, tid: SecureRandom.uuid, timestamp: Message., _method: "camera_aim", _data: , 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 (data: ) Thing::Product::CameraExposureModeSetServicesMessage.build( data: data ) end |
#build_thing_product_camera_exposure_mode_set_services_message_data ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/dji_mqtt_connect/factories/services/camera_exposure_mode_set.rb', line 13 def { 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 (result: 0) = { result: result } Thing::Product::CameraExposureModeSetServicesReplyMessage.new( bid: SecureRandom.uuid, tid: SecureRandom.uuid, timestamp: Message., _method: "camera_exposure_mode_set", _data: , 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 (data: ) Thing::Product::CameraExposureSetServicesMessage.build( data: data ) end |
#build_thing_product_camera_exposure_set_services_message_data ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/dji_mqtt_connect/factories/services/camera_exposure_set.rb', line 13 def { 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 (result: 0) = { result: result } Thing::Product::CameraExposureSetServicesReplyMessage.new( bid: SecureRandom.uuid, tid: SecureRandom.uuid, timestamp: Message., _method: "camera_exposure_set", _data: , 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 (data: ) Thing::Product::CameraFocalLengthSetServicesMessage.build( data: data ) end |
#build_thing_product_camera_focal_length_set_services_message_data ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/dji_mqtt_connect/factories/services/camera_focal_length_set.rb', line 13 def { 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 (result: 0) = { result: result } Thing::Product::CameraFocalLengthSetServicesReplyMessage.new( bid: SecureRandom.uuid, tid: SecureRandom.uuid, timestamp: Message., _method: "camera_focal_length_set", _data: , 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 (data: ) Thing::Product::CameraFocusModeSetServicesMessage.build( data: data ) end |
#build_thing_product_camera_focus_mode_set_services_message_data ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/dji_mqtt_connect/factories/services/camera_focus_mode_set.rb', line 13 def { 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 (result: 0) = { result: result } Thing::Product::CameraFocusModeSetServicesReplyMessage.new( bid: SecureRandom.uuid, tid: SecureRandom.uuid, timestamp: Message., _method: "camera_focus_mode_set", _data: , 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 (data: ) Thing::Product::CameraFocusValueSetServicesMessage.build( data: data ) end |
#build_thing_product_camera_focus_value_set_services_message_data ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/dji_mqtt_connect/factories/services/camera_focus_value_set.rb', line 13 def { 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 (result: 0) = { result: result } Thing::Product::CameraFocusValueSetServicesReplyMessage.new( bid: SecureRandom.uuid, tid: SecureRandom.uuid, timestamp: Message., _method: "camera_focus_value_set", _data: , 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 (data: ) Thing::Product::CameraFrameZoomServicesMessage.build( data: data ) end |
#build_thing_product_camera_frame_zoom_services_message_data ⇒ Object
61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/dji_mqtt_connect/factories/services/live_control.rb', line 61 def { 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 (result: 0) = { result: result } Thing::Product::CameraFrameZoomServicesReplyMessage.new( bid: SecureRandom.uuid, tid: SecureRandom.uuid, timestamp: Message., _method: "camera_frame_zoom", _data: , 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 (data: ) Thing::Product::CameraLookAtServicesMessage.build( data: data ) end |
#build_thing_product_camera_look_at_services_message_data ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/dji_mqtt_connect/factories/services/camera_look_at.rb', line 13 def { 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 (result: 0) = { result: result } Thing::Product::CameraLookAtServicesReplyMessage.new( bid: SecureRandom.uuid, tid: SecureRandom.uuid, timestamp: Message., _method: "camera_look_at", _data: , 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 (data: ) Thing::Product::CameraModeSwitchServicesMessage.build( data: data ) end |
#build_thing_product_camera_mode_switch_services_message_data ⇒ Object
13 14 15 16 17 18 |
# File 'lib/dji_mqtt_connect/factories/services/camera_mode_switch.rb', line 13 def { 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 (result: 0) = { result: result } Thing::Product::CameraModeSwitchServicesReplyMessage.new( bid: SecureRandom.uuid, tid: SecureRandom.uuid, timestamp: Message., _method: "camera_mode_switch", _data: , 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 (payload_index: "39-0-7") = { payload_index: payload_index } Thing::Product::CameraPhotoStopServicesMessage.build( 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 (result: 0) = { result: result } Thing::Product::CameraPhotoStopServicesReplyMessage.new( bid: SecureRandom.uuid, tid: SecureRandom.uuid, timestamp: Message., _method: "camera_photo_stop", _data: , 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 (payload_index: "39-0-7") = { payload_index: payload_index } Thing::Product::CameraPhotoTakeServicesMessage.build( 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 (result: 0) = { result: result } Thing::Product::CameraPhotoTakeServicesReplyMessage.new( bid: SecureRandom.uuid, tid: SecureRandom.uuid, timestamp: Message., _method: "camera_photo_take", _data: , 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 (data: ) Thing::Product::CameraPointFocusActionServicesMessage.build( data: data ) end |
#build_thing_product_camera_point_focus_action_services_message_data ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/dji_mqtt_connect/factories/services/camera_point_focus_action.rb', line 13 def { 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 (result: 0) = { result: result } Thing::Product::CameraPointFocusActionServicesReplyMessage.new( bid: SecureRandom.uuid, tid: SecureRandom.uuid, timestamp: Message., _method: "camera_point_focus_action", _data: , 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 (payload_index: "39-0-7") = { payload_index: payload_index } Thing::Product::CameraRecordingStartServicesMessage.build( 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 (result: 0) = { result: result } Thing::Product::CameraRecordingStartServicesReplyMessage.new( bid: SecureRandom.uuid, tid: SecureRandom.uuid, timestamp: Message., _method: "camera_recording_start", _data: , 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 (payload_index: "39-0-7") = { payload_index: payload_index } Thing::Product::CameraRecordingStopServicesMessage.build( 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 (result: 0) = { result: result } Thing::Product::CameraRecordingStopServicesReplyMessage.new( bid: SecureRandom.uuid, tid: SecureRandom.uuid, timestamp: Message., _method: "camera_recording_stop", _data: , 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 (data: ) Thing::Product::CameraScreenDragServicesMessage.build( data: data ) end |
#build_thing_product_camera_screen_drag_services_message_data ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/dji_mqtt_connect/factories/services/camera_screen_drag.rb', line 13 def { 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 (result: 0) = { result: result } Thing::Product::CameraScreenDragServicesReplyMessage.new( bid: SecureRandom.uuid, tid: SecureRandom.uuid, timestamp: Message., _method: "camera_screen_drag", _data: , 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 (data: ) Thing::Product::CameraScreenSplitServicesMessage.build( data: data ) end |
#build_thing_product_camera_screen_split_services_message_data ⇒ Object
13 14 15 16 17 18 |
# File 'lib/dji_mqtt_connect/factories/services/camera_screen_split.rb', line 13 def { 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 (result: 0) = { result: result } Thing::Product::CameraScreenSplitServicesReplyMessage.new( bid: SecureRandom.uuid, tid: SecureRandom.uuid, timestamp: Message., _method: "camera_screen_split", _data: , data: ) end |
#build_thing_product_charge_close_services_message ⇒ Object
Stop Charging ###
7 8 9 |
# File 'lib/dji_mqtt_connect/factories/services/charge_close.rb', line 7 def 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 (result: 0) = { result: result, output: { status: "ok" } } Thing::Product::ChargeCloseServicesReplyMessage.new( bid: SecureRandom.uuid, tid: SecureRandom.uuid, timestamp: Message., _method: "charge_close", _data: , data: ) end |
#build_thing_product_charge_open_services_message ⇒ Object
Stop Charging ###
7 8 9 |
# File 'lib/dji_mqtt_connect/factories/services/charge_open.rb', line 7 def 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 (result: 0) = { result: result, output: { status: "ok" } } Thing::Product::ChargeOpenServicesReplyMessage.new( bid: SecureRandom.uuid, tid: SecureRandom.uuid, timestamp: Message., _method: "charge_open", _data: , data: ) end |
#build_thing_product_cover_close_services_message ⇒ Object
9 10 11 |
# File 'lib/dji_mqtt_connect/factories/services_messages.rb', line 9 def Thing::Product::CoverCloseServicesMessage.build end |
#build_thing_product_cover_force_close_services_message ⇒ Object
Force Close ###
7 8 9 |
# File 'lib/dji_mqtt_connect/factories/services/cover_force_close.rb', line 7 def 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 (result: 0) = { result: result, output: { status: "ok" } } Thing::Product::CoverForceCloseServicesReplyMessage.new( bid: SecureRandom.uuid, tid: SecureRandom.uuid, timestamp: Message., _method: "cover_force_close", _data: , data: ) end |
#build_thing_product_cover_open_services_message ⇒ Object
13 14 15 |
# File 'lib/dji_mqtt_connect/factories/services_messages.rb', line 13 def Thing::Product::CoverOpenServicesMessage.build end |
#build_thing_product_debug_mode_close_services_message ⇒ Object
17 18 19 |
# File 'lib/dji_mqtt_connect/factories/services_messages.rb', line 17 def Thing::Product::DebugModeCloseServicesMessage.build end |
#build_thing_product_debug_mode_open_services_message ⇒ Object
21 22 23 |
# File 'lib/dji_mqtt_connect/factories/services_messages.rb', line 21 def Thing::Product::DebugModeOpenServicesMessage.build 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 (data: ) Thing::Product::DrcModeEnterServicesMessage.build( data: data ) end |
#build_thing_product_drc_mode_enter_services_message_data ⇒ Object
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 { 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 (result: 0) = { result: result } Thing::Product::DrcModeEnterServicesReplyMessage.new( bid: SecureRandom.uuid, tid: SecureRandom.uuid, timestamp: Message., _method: "drc_mode_enter", _data: , data: ) end |
#build_thing_product_drc_mode_exit_services_message ⇒ Object
5 6 7 |
# File 'lib/dji_mqtt_connect/factories/services/drc_mode_exit.rb', line 5 def 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 (result: 0) = { result: result } Thing::Product::DrcModeExitServicesReplyMessage.new( bid: SecureRandom.uuid, tid: SecureRandom.uuid, timestamp: Message., _method: "drc_mode_exit", _data: , data: ) end |
#build_thing_product_drone_close_services_message ⇒ Object
25 26 27 |
# File 'lib/dji_mqtt_connect/factories/services_messages.rb', line 25 def Thing::Product::DroneCloseServicesMessage.build end |
#build_thing_product_drone_open_services_message ⇒ Object
29 30 31 |
# File 'lib/dji_mqtt_connect/factories/services_messages.rb', line 29 def Thing::Product::DroneOpenServicesMessage.build end |
#build_thing_product_fileupload_list_services_message ⇒ Object
33 34 35 36 37 |
# File 'lib/dji_mqtt_connect/factories/services_messages.rb', line 33 def Thing::Product::FileuploadListServicesMessage.build( module_list: [0, 3] ) end |
#build_thing_product_fileupload_start_services_message ⇒ Object
39 40 41 42 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 75 76 77 |
# File 'lib/dji_mqtt_connect/factories/services_messages.rb', line 39 def = Message. 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: - 3000, size: 33789, start_time: - 4000 }, { boot_index: 22222, end_time: - 1000, size: 33789, start_time: - 2000 } ], module: "3", object_key: "object_key" } ] }, provider: "ali" } ) end |
#build_thing_product_flight_authority_grab_services_message ⇒ Object
Flight Authority Grab ###
7 8 9 |
# File 'lib/dji_mqtt_connect/factories/services/live_control.rb', line 7 def 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 (result: 0) = { result: result } Thing::Product::FlightAuthorityGrabServicesReplyMessage.new( bid: SecureRandom.uuid, tid: SecureRandom.uuid, timestamp: Message., _method: "flight_authority_grab", _data: , data: ) end |
#build_thing_product_flighttask_execute_services_message ⇒ Object
Flighttask Execute ###
81 82 83 |
# File 'lib/dji_mqtt_connect/factories/services_messages.rb', line 81 def Thing::Product::FlighttaskExecuteServicesMessage.build(flight_id: SecureRandom.uuid) end |
#build_thing_product_flighttask_pause_services_message ⇒ Object
85 86 87 |
# File 'lib/dji_mqtt_connect/factories/services_messages.rb', line 85 def Thing::Product::FlighttaskPauseServicesMessage.build end |
#build_thing_product_flighttask_prepare_services_message ⇒ Object
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 |
# File 'lib/dji_mqtt_connect/factories/services_messages.rb', line 89 def 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_message ⇒ Object
126 127 128 129 130 131 132 |
# File 'lib/dji_mqtt_connect/factories/services_messages.rb', line 126 def Thing::Product::FlighttaskProgressGetServicesMessage.build( data: { sn: "SN1234567890" } ) end |
#build_thing_product_flighttask_recovery_services_message ⇒ Object
122 123 124 |
# File 'lib/dji_mqtt_connect/factories/services_messages.rb', line 122 def Thing::Product::FlighttaskRecoveryServicesMessage.build end |
#build_thing_product_flighttask_stop_services_message ⇒ Object
134 135 136 137 138 139 140 141 |
# File 'lib/dji_mqtt_connect/factories/services_messages.rb', line 134 def Thing::Product::FlighttaskStopServicesMessage.build( data: { flight_id: SecureRandom.uuid, reason: 0 } ) end |
#build_thing_product_flighttask_undo_services_message ⇒ Object
143 144 145 146 147 |
# File 'lib/dji_mqtt_connect/factories/services_messages.rb', line 143 def Thing::Product::FlighttaskUndoServicesMessage.build( flight_ids: [SecureRandom.uuid, SecureRandom.uuid] ) end |
#build_thing_product_fly_to_point_services_message ⇒ Object
Fly to Point (Services Messages) ###
151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 |
# File 'lib/dji_mqtt_connect/factories/services_messages.rb', line 151 def = { fly_to_id: SecureRandom.uuid, points: [ { latitude: 37.7749, longitude: -122.4194, height: 100 } ], max_speed: 5 } Thing::Product::FlyToPointServicesMessage.build( data: ) end |
#build_thing_product_fly_to_point_stop_services_message ⇒ Object
169 170 171 |
# File 'lib/dji_mqtt_connect/factories/services_messages.rb', line 169 def Thing::Product::FlyToPointStopServicesMessage.build end |
#build_thing_product_fly_to_point_update_services_message ⇒ Object
173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 |
# File 'lib/dji_mqtt_connect/factories/services_messages.rb', line 173 def = { points: [ { latitude: 37.7750, longitude: -122.4195, height: 120 } ], max_speed: 6 } Thing::Product::FlyToPointUpdateServicesMessage.build( 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 (data: ) Thing::Product::GimbalResetServicesMessage.build( data: data ) end |
#build_thing_product_gimbal_reset_services_message_data ⇒ Object
13 14 15 16 17 18 |
# File 'lib/dji_mqtt_connect/factories/services/gimbal_reset.rb', line 13 def { 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 (result: 0) = { result: result } Thing::Product::GimbalResetServicesReplyMessage.new( bid: SecureRandom.uuid, tid: SecureRandom.uuid, timestamp: Message., _method: "gimbal_reset", _data: , 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 (data: ) Thing::Product::IrMeteringAreaSetServicesMessage.build( data: data ) end |
#build_thing_product_ir_metering_area_set_services_message_data ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/dji_mqtt_connect/factories/services/ir_metering_area_set.rb', line 13 def { 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 (result: 0) = { result: result } Thing::Product::IrMeteringAreaSetServicesReplyMessage.new( bid: SecureRandom.uuid, tid: SecureRandom.uuid, timestamp: Message., _method: "ir_metering_area_set", _data: , 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 (data: ) Thing::Product::IrMeteringModeSetServicesMessage.build( data: data ) end |
#build_thing_product_ir_metering_mode_set_services_message_data ⇒ Object
13 14 15 16 17 18 |
# File 'lib/dji_mqtt_connect/factories/services/ir_metering_mode_set.rb', line 13 def { mode: Thing::Product::IrMeteringModeSetServicesMessage::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 (result: 0) = { result: result } Thing::Product::IrMeteringModeSetServicesReplyMessage.new( bid: SecureRandom.uuid, tid: SecureRandom.uuid, timestamp: Message., _method: "ir_metering_mode_set", _data: , 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 (data: ) Thing::Product::IrMeteringPointSetServicesMessage.build( data: data ) end |
#build_thing_product_ir_metering_point_set_services_message_data ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/dji_mqtt_connect/factories/services/ir_metering_point_set.rb', line 13 def { 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 (result: 0) = { result: result } Thing::Product::IrMeteringPointSetServicesReplyMessage.new( bid: SecureRandom.uuid, tid: SecureRandom.uuid, timestamp: Message., _method: "ir_metering_point_set", _data: , data: ) end |
#build_thing_product_live_lens_change_services_message ⇒ Object
Live Stream (Services Messages) ###
192 193 194 195 196 197 198 199 |
# File 'lib/dji_mqtt_connect/factories/services_messages.rb', line 192 def Thing::Product::LiveLensChangeServicesMessage.build( data: { video_id: "1ZNDH1D0010098/39-0-7/normal-0", video_type: "wide" } ) end |
#build_thing_product_live_set_quality_services_message ⇒ Object
201 202 203 204 205 206 207 208 |
# File 'lib/dji_mqtt_connect/factories/services_messages.rb', line 201 def Thing::Product::LiveSetQualityServicesMessage.build( data: { video_id: "1ZNDH1D0010098/39-0-7/normal-0", video_quality: 0 } ) end |
#build_thing_product_live_start_push_services_message ⇒ Object
210 211 212 213 214 215 216 217 218 219 |
# File 'lib/dji_mqtt_connect/factories/services_messages.rb', line 210 def 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_message ⇒ Object
221 222 223 224 225 226 227 |
# File 'lib/dji_mqtt_connect/factories/services_messages.rb', line 221 def 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 (data: ) Thing::Product::OtaCreateServicesMessage.build( data: data ) end |
#build_thing_product_ota_create_services_message_data ⇒ Object
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 { 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 (status: "ok", result: 0) = { status: status, result: result } Thing::Product::OtaCreateServicesReplyMessage.new( bid: SecureRandom.uuid, tid: SecureRandom.uuid, timestamp: Message., _method: "ota_create", _data: , 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 (payload_index: "39-0-7") = { payload_index: payload_index } Thing::Product::PayloadAuthorityGrabServicesMessage.build( 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 (result: 0) = { result: result } Thing::Product::PayloadAuthorityGrabServicesReplyMessage.new( bid: SecureRandom.uuid, tid: SecureRandom.uuid, timestamp: Message., _method: "payload_authority_grab", _data: , 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 (data: ) Thing::Product::PhotoStorageSetServicesMessage.build( data: data ) end |
#build_thing_product_photo_storage_set_services_message_data ⇒ Object
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/dji_mqtt_connect/factories/services/photo_storage_set.rb', line 13 def { 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 (result: 0) = { result: result } Thing::Product::PhotoStorageSetServicesReplyMessage.new( bid: SecureRandom.uuid, tid: SecureRandom.uuid, timestamp: Message., _method: "photo_storage_set", _data: , data: ) end |
#build_thing_product_return_home_cancel_services_message ⇒ Object
233 234 235 |
# File 'lib/dji_mqtt_connect/factories/services_messages.rb', line 233 def Thing::Product::ReturnHomeCancelServicesMessage.build end |
#build_thing_product_return_home_services_message ⇒ Object
229 230 231 |
# File 'lib/dji_mqtt_connect/factories/services_messages.rb', line 229 def Thing::Product::ReturnHomeServicesMessage.build end |
#build_thing_product_return_specific_home_services_message(home_dock_sn: "SN1234567890") ⇒ Object
237 238 239 |
# File 'lib/dji_mqtt_connect/factories/services_messages.rb', line 237 def (home_dock_sn: "SN1234567890") Thing::Product::ReturnSpecificHomeServicesMessage.build(home_dock_sn: home_dock_sn) end |
#build_thing_product_takeoff_to_point_services_message ⇒ Object
Takeoff to Point (Services Messages) ###
243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 |
# File 'lib/dji_mqtt_connect/factories/services_messages.rb', line 243 def = { 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: ) end |
#build_thing_product_takeoff_to_point_services_reply_message ⇒ Object
265 266 267 268 269 270 271 272 273 274 275 276 277 278 |
# File 'lib/dji_mqtt_connect/factories/services_messages.rb', line 265 def = { result: 0 } Thing::Product::TakeoffToPointServicesReplyMessage.new( bid: Message.generate_bid, tid: Message.generate_tid, timestamp: Message., _method: "takeoff_to_point", _data: , 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 (data: ) Thing::Product::VideoStorageSetServicesMessage.build( data: data ) end |
#build_thing_product_video_storage_set_services_message_data ⇒ Object
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/dji_mqtt_connect/factories/services/video_storage_set.rb', line 13 def { 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 (result: 0) = { result: result } Thing::Product::VideoStorageSetServicesReplyMessage.new( bid: SecureRandom.uuid, tid: SecureRandom.uuid, timestamp: Message., _method: "video_storage_set", _data: , data: ) end |