25 #include "HoistCtrl.h" 26 #include "MQTTCommunication.h" unsigned int pRandomDelayFactor
some sort of ALOHA stuff
Event currentEvent
holds the current event of the FSM
int actualLine
actual line initialised with 1
VehicleCtrl::Event doAction_resetState()
main action of the resetState
void publishTargetPosition()
Update position and Publish actual position.
VehicleCtrl::Event doAction_unloadVehicle()
main action of the unloadVehicle
VehicleCtrl::Event doAction_waitForBox()
main action of the waitForBox
NavigationCtrl::Sector targetSector
actual sector initialise with Sortic handover
void publishTargetPositionBlockLine()
bool checkForError()
Check if a new message with a error is received.
Resume after Error occured.
unsigned long previousMillisPublishToken
will store last time token published
String ack
ack for handshake vehicle
Event
Enum holds all possible events.
String req
req for handshake vehicle
VehicleCtrl::Event doAction_errorState()
main action of the errorState
void entryAction_loadVehicle()
entry action of the loadVehicle
VehicleCtrl()
Construct a new Vehicle Ctrl object.
wait for box to transport
unsigned long previousMillis
will store last time published
Event(VehicleCtrl::* doActionFPtr)(void)
Functionpointer to call the current states do-function.
void exitAction_handshake()
exit action of the handshake
HoistCtrl pHoistCtrl
Hoist Controll object.
void process(Event e)
changes the state of the FSM based on the event
The Vehicle Controll class contains the FSM for the complete Vehicle.
NavigationCtrl::Sector actualSector
actual sector initialise with Sortic handover
NavigationCtrl pNavCtrl
Navigation Controll object.
String substate
substatus of the Vhicle
int pTransferPark[SORTIC_MAX_LINE]
Sortic with 10 diffrent lines.
State
Enum holds all possible state's.
int pSorticPark[SORTIC_MAX_LINE]
Sortic with 10 diffrent lines.
void clearGui()
clear node Red gui
Contains the FSM for the Navigation.
const int DEFAUL_HOSTNAME_NUMBER
defines also startline.
String cargo
cargo; not used atm
VehicleCtrl::Event doAction_loadVehicle()
main action of the loadVehicle
VehicleCtrl::Event doAction_handshake()
main action of the handshake
void exitAction_waitForBox()
exit action of the waitForBox
unsigned long previousMillisPublish
will store last publish time
Communication pComm
Communication object.
unsigned long currentMillis
will store current time
void exitAction_unloadVehicle()
exit action of the unloadVehicle
void exitAction_errorState()
exit action of the errorState
The Navigation Controll class contains the FSM for the Navigation.
State currentState
holds the current state of the FSM
String status
status of the Vehicle FSM
void entryAction_waitForBox()
entry action of the waitForBox
String decodeState(State state)
Decodes the State-Enum and returns a description.
void entryAction_errorState()
entry action of the errorState
const unsigned int SORTIC_MAX_LINE
How many lines are available. Needed atm to choose a free line without handshake with sortic.
void loop()
Calls the do-function of the active state and hence generates Events.
Holds all relevant infos for the Vehicle.
int targetLine
tartget line initialised with 1
struct VehicleCtrl::Vehicle vehicle
void exitAction_resetState()
exit action of the resetState
void entryAction_resetState()
entry action of the resetState
void publishState(State state)
Update State and Publish actual state.
unsigned long previousMillisPublishPos
will store last publish position time
void entryAction_handshake()
entry action of the handshake
#define DEFAULT_HOSTNAME
Hostname of the vehicle. Used for Communication and identification. Needs to be unique.
int substate
actual Substate of FSM
String decodeEvent(Event event)
Decodes the Event-Enum and returns a description.
void entryAction_unloadVehicle()
entry action of the unloadVehicle
void exitAction_loadVehicle()
exit action of the loadVehicle
void publishPosition()
Update position and Publish actual position.
State lastStateBevorError
holds the last state of the FSM so it's possible to resume after error
File that contains the configuratioindetails of the different modules.
Reset after Error occured.
Sector
Enum holds all possible sectors.