Patrol

Vue SFC used as a page for patrol planner. This component manages the layout for the patrol planner page. It uses 1 PatrolMap component and 1 WaypointTable component. The PatrolMap shows the map for the robot and allows users to click on the map to set waypoint, those waypoint are then showed in the WaypointTable that allows to remove any undesired points. The page also contains a box with 2 buttons and a title. The buttons are used to send the current waypoint list or clean it (remove every points). It communicates with parent component through the bus in props. This component have the following dependency : PatrolMap.vue Component, WaypointTable.map Component and Bootstrap-Vue for styling.

Props

Name Type Default value Required? Description
bus Vue - Yes Vue bus use to emit event to other components.
Router Vue - Yes Vue bus use to routing emit event to parent.

Data

Name Type Default value Description
waypointList Array.<Object> - Lists of the current waypoints.
patrolList Array.<Object> - Lists of saved patrol fetched on DB.

Events

Name Payload Type Description
destroyed Event indicating the component has been destroyed.
mounted Event indicating the component has been mounted.
send-patrol patrol Event sending the patrol to the layout to send to robot.
send-patrol-list patrolList Event saving the patrol list on DB.

Methods

clearPatrolList()

Method used to clear the patrol list (delete the list on db)
Source:

clearWaypointList()

Callback used to clear the patrol
Source:

getSavedPatrols()

Callback used to get patrols on DB
Source:

sendPatrol()

Callback used to send the patrol to the connected robot robot
Source: