C# 클래스 MissionPlanner.MAVLinkInterface

상속: MAVLink, IDisposable
파일 보기 프로젝트 열기: ArduPilot/MissionPlanner 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
CONNECT_TIMEOUT_SECONDS double
MAVlist MAVList
ReadOnly bool
Terrain MissionPlanner.Utilities.TerrainFollow
speechenabled bool

Private Properties

프로퍼티 타입 설명
FrmProgressReporterDoWorkAndParams void
FrmProgressReporterDoWorkNOParams void
FrmProgressReporterGetParams void
OpenBg void
PacketReceived void
SetupMavConnect void
doAction bool
generatePacket void
generatePacket void
generatePacket void
getDatastream void
getDatastream void
getParamListBG System.Collections.Hashtable
getWPsfromstream void
hzratecheck bool
readlogPacketMavlink MAVLinkMessage

공개 메소드들

메소드 설명
Close ( ) : void
DebugPacket ( MAVLinkMessage datin ) : object
DebugPacket ( MAVLinkMessage datin, bool PrintToConsole ) : object
DebugPacket ( MAVLinkMessage datin, string &text ) : object
DebugPacket ( MAVLinkMessage datin, string &text, bool PrintToConsole, string delimeter = " " ) : object

Print entire decoded packet to console

Dispose ( ) : void
EraseLog ( ) : void
GetLog ( ushort no ) : FileStream
GetLogEntry ( ushort startno, ushort endno = ushort.MaxValue ) : mavlink_log_entry_t
GetLogList ( ) : List
GetMountStatus ( ) : void
GetParam ( byte sysid, byte compid, string name = "", short index = -1, bool requireresponce = true ) : float

Get param by either index or name

GetParam ( short index ) : float
GetParam ( string name ) : float
GetParam ( string name = "", short index = -1, bool requireresponce = true ) : float
InjectGpsData ( byte data, byte length ) : void
InjectGpsData ( byte sysid, byte compid, byte data, byte length, bool rtcm_message = true ) : void

used to inject data into the gps ie rtcm/sbp/ubx

MAVLinkInterface ( ) : System
MAVLinkInterface ( Stream logfileStream ) : System
Open ( ) : void
Open ( bool getparams, bool skipconnectedcheck = false ) : void
SendAck ( ) : void
SendSerialControl ( SERIAL_CONTROL_DEV port, ushort timeoutms, byte data, uint baudrate, bool close = false ) : void
SetSensorOffsets ( sensoroffsetsenum sensor, float x, float y, float z ) : bool
SubscribeToPacketType ( MAVLINK_MSG_ID type, bool>.Func function, bool exclusive = false ) : KeyValuePair>
ToString ( ) : string
UnSubscribeToPacketType ( bool>.KeyValuePair item ) : void
UnSubscribeToPacketType ( MAVLINK_MSG_ID msgtype, bool>.Func item ) : void
Write ( string line ) : bool
disableSigning ( int sysid, int compid ) : bool
doARM ( bool armit ) : bool
doARM ( byte sysid, byte compid, bool armit ) : bool
doAbortLand ( ) : bool
doCommand ( MAV_CMD actionid, float p1, float p2, float p3, float p4, float p5, float p6, float p7, bool requireack = true ) : bool
doCommand ( byte sysid, byte compid, MAV_CMD actionid, float p1, float p2, float p3, float p4, float p5, float p6, float p7, bool requireack = true ) : bool
doMotorTest ( int motor, MAVLink thr_type, int throttle, int timeout, int motorcount ) : bool
doReboot ( bool bootloadermode = false, bool currentvehicle = true ) : bool

reboot the vehicle

enableSigning ( int sysid, int compid ) : bool
getFencePoint ( int no, int &total ) : MissionPlanner.Utilities.PointLatLngAlt
getHeartBeat ( ) : MAVLinkMessage
getHomePosition ( ) : Locationwp
getParamList ( ) : void
getParamPoll ( ) : void
getRallyPoint ( int no, int &total ) : MissionPlanner.Utilities.PointLatLngAlt
getRallyPoints ( ) : List
getRequestedWPNo ( ) : int
getVersion ( ) : bool
getWP ( ushort index ) : Locationwp

Gets specfied WP

getWPCount ( ) : ushort

Returns WP count

modifyParamForDisplay ( bool fromapm, string paramname, float &value ) : void
readPacket ( ) : MAVLinkMessage

Serial Reader to read mavlink packets. POLL method

requestDatastream ( MAVLink id, byte hzrate, int sysid = -1, int compid = -1 ) : void
sendPacket ( object indata, int sysid, int compid ) : void
setAPType ( byte sysid, byte compid ) : void
setAttitudeTarget ( ) : void
setDigicamConfigure ( ) : void
setDigicamControl ( bool shot ) : void
setFencePoint ( byte index, PointLatLngAlt plla, byte fencepointcount ) : bool
setGuidedModeWP ( Locationwp gotohere, bool setguidedmode = true ) : void
setMode ( byte sysid, byte compid, mavlink_set_mode_t mode, MAV_MODE_FLAG base_mode ) : void
setMode ( byte sysid, byte compid, string modein ) : void
setMode ( mavlink_set_mode_t mode, MAV_MODE_FLAG base_mode ) : void
setMode ( string modein ) : void
setMountConfigure ( MAV_MOUNT_MODE mountmode, bool stabroll, bool stabpitch, bool stabyaw ) : void
setMountControl ( double pa, double pb, double pc, bool islatlng ) : void
setNewWPAlt ( Locationwp gotohere ) : void
setNextWPTargetAlt ( ushort wpno, float alt ) : void
setParam ( byte sysid, byte compid, string paramname, double value, bool force = false ) : bool

Set parameter on apm

setParam ( string paramnames, double value ) : bool

set param on apm, used for param rename

setParam ( string paramname, double value, bool force = false ) : bool
setPositionTargetGlobalInt ( byte sysid, byte compid, bool pos, bool vel, bool acc, MAV_FRAME frame, double lat, double lng, double alt, double vx, double vy, double vz ) : void
setRallyPoint ( byte index, PointLatLngAlt plla, short break_alt, UInt16 land_dir_cd, byte flags, byte rallypointcount ) : bool
setWP ( Locationwp loc, ushort index, MAV_FRAME frame, byte current, byte autocontinue = 1, bool use_int = false ) : MAV_MISSION_RESULT

Save wp to eeprom

setWP ( mavlink_mission_item_int_t req ) : MAV_MISSION_RESULT
setWP ( mavlink_mission_item_t req ) : MAV_MISSION_RESULT
setWPACK ( ) : void
setWPCurrent ( ushort index ) : bool
setWPPartialUpdate ( ushort startwp, ushort endwp ) : void

Set start and finish for partial wp upload.

setWPTotal ( ushort wp_total ) : void

Sets wp total count

setupSigning ( string userseed, byte key = null ) : bool
stopall ( bool forget ) : void

Stops all requested data packets.

translateMode ( byte sysid, byte compid, string modein, MAVLink &mode ) : bool
translateMode ( string modein, MAVLink &mode ) : bool

비공개 메소드들

메소드 설명
FrmProgressReporterDoWorkAndParams ( object sender, MissionPlanner.Controls.ProgressWorkerEventArgs e, object passdata = null ) : void
FrmProgressReporterDoWorkNOParams ( object sender, MissionPlanner.Controls.ProgressWorkerEventArgs e, object passdata = null ) : void
FrmProgressReporterGetParams ( object sender, MissionPlanner.Controls.ProgressWorkerEventArgs e, object passdata = null ) : void
OpenBg ( object PRsender, bool getparams, MissionPlanner.Controls.ProgressWorkerEventArgs progressWorkerEventArgs ) : void
PacketReceived ( MAVLinkMessage buffer ) : void
SetupMavConnect ( MAVLinkMessage message, mavlink_heartbeat_t hb ) : void
doAction ( object actionid ) : bool
generatePacket ( MAVLINK_MSG_ID messageType, object indata ) : void
generatePacket ( int messageType, object indata ) : void
generatePacket ( int messageType, object indata, int sysid, int compid, bool forcemavlink2 = false, bool forcesigning = false ) : void

Generate a Mavlink Packet and write to serial

getDatastream ( MAVLink id, byte hzrate ) : void
getDatastream ( byte sysid, byte compid, MAVLink id, byte hzrate ) : void
getParamListBG ( ) : Hashtable

Get param list from apm

getWPsfromstream ( MAVLinkMessage &buffer, byte sysid, byte compid ) : void

Used to extract mission from log file - both sent or received

hzratecheck ( double pps, int hzrate ) : bool
readlogPacketMavlink ( ) : MAVLinkMessage

메소드 상세

Close() 공개 메소드

public Close ( ) : void
리턴 void

DebugPacket() 공개 메소드

public DebugPacket ( MAVLinkMessage datin ) : object
datin MAVLinkMessage
리턴 object

DebugPacket() 공개 메소드

public DebugPacket ( MAVLinkMessage datin, bool PrintToConsole ) : object
datin MAVLinkMessage
PrintToConsole bool
리턴 object

DebugPacket() 공개 메소드

public DebugPacket ( MAVLinkMessage datin, string &text ) : object
datin MAVLinkMessage
text string
리턴 object

DebugPacket() 공개 메소드

Print entire decoded packet to console
public DebugPacket ( MAVLinkMessage datin, string &text, bool PrintToConsole, string delimeter = " " ) : object
datin MAVLinkMessage packet byte array
text string
PrintToConsole bool
delimeter string
리턴 object

Dispose() 공개 메소드

public Dispose ( ) : void
리턴 void

EraseLog() 공개 메소드

public EraseLog ( ) : void
리턴 void

GetLog() 공개 메소드

public GetLog ( ushort no ) : FileStream
no ushort
리턴 System.IO.FileStream

GetLogEntry() 공개 메소드

public GetLogEntry ( ushort startno, ushort endno = ushort.MaxValue ) : mavlink_log_entry_t
startno ushort
endno ushort
리턴 mavlink_log_entry_t

GetLogList() 공개 메소드

public GetLogList ( ) : List
리턴 List

GetMountStatus() 공개 메소드

public GetMountStatus ( ) : void
리턴 void

GetParam() 공개 메소드

Get param by either index or name
public GetParam ( byte sysid, byte compid, string name = "", short index = -1, bool requireresponce = true ) : float
sysid byte
compid byte
name string
index short
requireresponce bool
리턴 float

GetParam() 공개 메소드

public GetParam ( short index ) : float
index short
리턴 float

GetParam() 공개 메소드

public GetParam ( string name ) : float
name string
리턴 float

GetParam() 공개 메소드

public GetParam ( string name = "", short index = -1, bool requireresponce = true ) : float
name string
index short
requireresponce bool
리턴 float

InjectGpsData() 공개 메소드

public InjectGpsData ( byte data, byte length ) : void
data byte
length byte
리턴 void

InjectGpsData() 공개 메소드

used to inject data into the gps ie rtcm/sbp/ubx
public InjectGpsData ( byte sysid, byte compid, byte data, byte length, bool rtcm_message = true ) : void
sysid byte
compid byte
data byte
length byte
rtcm_message bool
리턴 void

MAVLinkInterface() 공개 메소드

public MAVLinkInterface ( ) : System
리턴 System

MAVLinkInterface() 공개 메소드

public MAVLinkInterface ( Stream logfileStream ) : System
logfileStream Stream
리턴 System

Open() 공개 메소드

public Open ( ) : void
리턴 void

Open() 공개 메소드

public Open ( bool getparams, bool skipconnectedcheck = false ) : void
getparams bool
skipconnectedcheck bool
리턴 void

SendAck() 공개 메소드

public SendAck ( ) : void
리턴 void

SendSerialControl() 공개 메소드

public SendSerialControl ( SERIAL_CONTROL_DEV port, ushort timeoutms, byte data, uint baudrate, bool close = false ) : void
port SERIAL_CONTROL_DEV
timeoutms ushort
data byte
baudrate uint
close bool
리턴 void

SetSensorOffsets() 공개 메소드

public SetSensorOffsets ( sensoroffsetsenum sensor, float x, float y, float z ) : bool
sensor sensoroffsetsenum
x float
y float
z float
리턴 bool

SubscribeToPacketType() 공개 메소드

public SubscribeToPacketType ( MAVLINK_MSG_ID type, bool>.Func function, bool exclusive = false ) : KeyValuePair>
type MAVLINK_MSG_ID
function bool>.Func
exclusive bool
리턴 KeyValuePair>

ToString() 공개 메소드

public ToString ( ) : string
리턴 string

UnSubscribeToPacketType() 공개 메소드

public UnSubscribeToPacketType ( bool>.KeyValuePair item ) : void
item bool>.KeyValuePair
리턴 void

UnSubscribeToPacketType() 공개 메소드

public UnSubscribeToPacketType ( MAVLINK_MSG_ID msgtype, bool>.Func item ) : void
msgtype MAVLINK_MSG_ID
item bool>.Func
리턴 void

Write() 공개 메소드

public Write ( string line ) : bool
line string
리턴 bool

disableSigning() 공개 메소드

public disableSigning ( int sysid, int compid ) : bool
sysid int
compid int
리턴 bool

doARM() 공개 메소드

public doARM ( bool armit ) : bool
armit bool
리턴 bool

doARM() 공개 메소드

public doARM ( byte sysid, byte compid, bool armit ) : bool
sysid byte
compid byte
armit bool
리턴 bool

doAbortLand() 공개 메소드

public doAbortLand ( ) : bool
리턴 bool

doCommand() 공개 메소드

public doCommand ( MAV_CMD actionid, float p1, float p2, float p3, float p4, float p5, float p6, float p7, bool requireack = true ) : bool
actionid MAV_CMD
p1 float
p2 float
p3 float
p4 float
p5 float
p6 float
p7 float
requireack bool
리턴 bool

doCommand() 공개 메소드

public doCommand ( byte sysid, byte compid, MAV_CMD actionid, float p1, float p2, float p3, float p4, float p5, float p6, float p7, bool requireack = true ) : bool
sysid byte
compid byte
actionid MAV_CMD
p1 float
p2 float
p3 float
p4 float
p5 float
p6 float
p7 float
requireack bool
리턴 bool

doMotorTest() 공개 메소드

public doMotorTest ( int motor, MAVLink thr_type, int throttle, int timeout, int motorcount ) : bool
motor int
thr_type MAVLink
throttle int
timeout int
motorcount int
리턴 bool

doReboot() 공개 메소드

reboot the vehicle
public doReboot ( bool bootloadermode = false, bool currentvehicle = true ) : bool
bootloadermode bool reboot into bootloader mode?
currentvehicle bool use current sysid/compid or scan for it
리턴 bool

enableSigning() 공개 메소드

public enableSigning ( int sysid, int compid ) : bool
sysid int
compid int
리턴 bool

getFencePoint() 공개 메소드

public getFencePoint ( int no, int &total ) : MissionPlanner.Utilities.PointLatLngAlt
no int
total int
리턴 MissionPlanner.Utilities.PointLatLngAlt

getHeartBeat() 공개 메소드

public getHeartBeat ( ) : MAVLinkMessage
리턴 MAVLinkMessage

getHomePosition() 공개 메소드

public getHomePosition ( ) : Locationwp
리턴 MissionPlanner.Utilities.Locationwp

getParamList() 공개 메소드

public getParamList ( ) : void
리턴 void

getParamPoll() 공개 메소드

public getParamPoll ( ) : void
리턴 void

getRallyPoint() 공개 메소드

public getRallyPoint ( int no, int &total ) : MissionPlanner.Utilities.PointLatLngAlt
no int
total int
리턴 MissionPlanner.Utilities.PointLatLngAlt

getRallyPoints() 공개 메소드

public getRallyPoints ( ) : List
리턴 List

getRequestedWPNo() 공개 메소드

public getRequestedWPNo ( ) : int
리턴 int

getVersion() 공개 메소드

public getVersion ( ) : bool
리턴 bool

getWP() 공개 메소드

Gets specfied WP
public getWP ( ushort index ) : Locationwp
index ushort
리턴 MissionPlanner.Utilities.Locationwp

getWPCount() 공개 메소드

Returns WP count
public getWPCount ( ) : ushort
리턴 ushort

modifyParamForDisplay() 공개 정적인 메소드

public static modifyParamForDisplay ( bool fromapm, string paramname, float &value ) : void
fromapm bool
paramname string
value float
리턴 void

readPacket() 공개 메소드

Serial Reader to read mavlink packets. POLL method
public readPacket ( ) : MAVLinkMessage
리턴 MAVLinkMessage

requestDatastream() 공개 메소드

public requestDatastream ( MAVLink id, byte hzrate, int sysid = -1, int compid = -1 ) : void
id MAVLink
hzrate byte
sysid int
compid int
리턴 void

sendPacket() 공개 메소드

public sendPacket ( object indata, int sysid, int compid ) : void
indata object
sysid int
compid int
리턴 void

setAPType() 공개 메소드

public setAPType ( byte sysid, byte compid ) : void
sysid byte
compid byte
리턴 void

setAttitudeTarget() 공개 메소드

public setAttitudeTarget ( ) : void
리턴 void

setDigicamConfigure() 공개 메소드

public setDigicamConfigure ( ) : void
리턴 void

setDigicamControl() 공개 메소드

public setDigicamControl ( bool shot ) : void
shot bool
리턴 void

setFencePoint() 공개 메소드

public setFencePoint ( byte index, PointLatLngAlt plla, byte fencepointcount ) : bool
index byte
plla PointLatLngAlt
fencepointcount byte
리턴 bool

setGuidedModeWP() 공개 메소드

public setGuidedModeWP ( Locationwp gotohere, bool setguidedmode = true ) : void
gotohere Locationwp
setguidedmode bool
리턴 void

setMode() 공개 메소드

public setMode ( byte sysid, byte compid, mavlink_set_mode_t mode, MAV_MODE_FLAG base_mode ) : void
sysid byte
compid byte
mode mavlink_set_mode_t
base_mode MAV_MODE_FLAG
리턴 void

setMode() 공개 메소드

public setMode ( byte sysid, byte compid, string modein ) : void
sysid byte
compid byte
modein string
리턴 void

setMode() 공개 메소드

public setMode ( mavlink_set_mode_t mode, MAV_MODE_FLAG base_mode ) : void
mode mavlink_set_mode_t
base_mode MAV_MODE_FLAG
리턴 void

setMode() 공개 메소드

public setMode ( string modein ) : void
modein string
리턴 void

setMountConfigure() 공개 메소드

public setMountConfigure ( MAV_MOUNT_MODE mountmode, bool stabroll, bool stabpitch, bool stabyaw ) : void
mountmode MAV_MOUNT_MODE
stabroll bool
stabpitch bool
stabyaw bool
리턴 void

setMountControl() 공개 메소드

public setMountControl ( double pa, double pb, double pc, bool islatlng ) : void
pa double
pb double
pc double
islatlng bool
리턴 void

setNewWPAlt() 공개 메소드

public setNewWPAlt ( Locationwp gotohere ) : void
gotohere Locationwp
리턴 void

setNextWPTargetAlt() 공개 메소드

public setNextWPTargetAlt ( ushort wpno, float alt ) : void
wpno ushort
alt float
리턴 void

setParam() 공개 메소드

Set parameter on apm
public setParam ( byte sysid, byte compid, string paramname, double value, bool force = false ) : bool
sysid byte
compid byte
paramname string name as a string
value double
force bool
리턴 bool

setParam() 공개 메소드

set param on apm, used for param rename
public setParam ( string paramnames, double value ) : bool
paramnames string
value double
리턴 bool

setParam() 공개 메소드

public setParam ( string paramname, double value, bool force = false ) : bool
paramname string
value double
force bool
리턴 bool

setPositionTargetGlobalInt() 공개 메소드

public setPositionTargetGlobalInt ( byte sysid, byte compid, bool pos, bool vel, bool acc, MAV_FRAME frame, double lat, double lng, double alt, double vx, double vy, double vz ) : void
sysid byte
compid byte
pos bool
vel bool
acc bool
frame MAV_FRAME
lat double
lng double
alt double
vx double
vy double
vz double
리턴 void

setRallyPoint() 공개 메소드

public setRallyPoint ( byte index, PointLatLngAlt plla, short break_alt, UInt16 land_dir_cd, byte flags, byte rallypointcount ) : bool
index byte
plla PointLatLngAlt
break_alt short
land_dir_cd UInt16
flags byte
rallypointcount byte
리턴 bool

setWP() 공개 메소드

Save wp to eeprom
public setWP ( Locationwp loc, ushort index, MAV_FRAME frame, byte current, byte autocontinue = 1, bool use_int = false ) : MAV_MISSION_RESULT
loc Locationwp location struct
index ushort wp no
frame MAV_FRAME global or relative
current byte 0 = no , 2 = guided mode
autocontinue byte
use_int bool
리턴 MAV_MISSION_RESULT

setWP() 공개 메소드

public setWP ( mavlink_mission_item_int_t req ) : MAV_MISSION_RESULT
req mavlink_mission_item_int_t
리턴 MAV_MISSION_RESULT

setWP() 공개 메소드

public setWP ( mavlink_mission_item_t req ) : MAV_MISSION_RESULT
req mavlink_mission_item_t
리턴 MAV_MISSION_RESULT

setWPACK() 공개 메소드

public setWPACK ( ) : void
리턴 void

setWPCurrent() 공개 메소드

public setWPCurrent ( ushort index ) : bool
index ushort
리턴 bool

setWPPartialUpdate() 공개 메소드

Set start and finish for partial wp upload.
public setWPPartialUpdate ( ushort startwp, ushort endwp ) : void
startwp ushort
endwp ushort
리턴 void

setWPTotal() 공개 메소드

Sets wp total count
public setWPTotal ( ushort wp_total ) : void
wp_total ushort
리턴 void

setupSigning() 공개 메소드

public setupSigning ( string userseed, byte key = null ) : bool
userseed string
key byte
리턴 bool

stopall() 공개 메소드

Stops all requested data packets.
public stopall ( bool forget ) : void
forget bool
리턴 void

translateMode() 공개 메소드

public translateMode ( byte sysid, byte compid, string modein, MAVLink &mode ) : bool
sysid byte
compid byte
modein string
mode MAVLink
리턴 bool

translateMode() 공개 메소드

public translateMode ( string modein, MAVLink &mode ) : bool
modein string
mode MAVLink
리턴 bool

프로퍼티 상세

CONNECT_TIMEOUT_SECONDS 공개적으로 프로퍼티

public double CONNECT_TIMEOUT_SECONDS
리턴 double

MAVlist 공개적으로 프로퍼티

public MAVList MAVlist
리턴 MAVList

ReadOnly 공개적으로 프로퍼티

public bool ReadOnly
리턴 bool

Terrain 공개적으로 프로퍼티

public TerrainFollow,MissionPlanner.Utilities Terrain
리턴 MissionPlanner.Utilities.TerrainFollow

speechenabled 공개적으로 프로퍼티

used to disable all speech originating from this module
public bool speechenabled
리턴 bool