View Source XGPS.Ports (Elixir.XGPS v1.0.0)

Link to this section Summary

Functions

Returns a specification to start this module under a supervisor.

Return the latest position if atteched to GPS.

Return all the connected port names

Callback implementation for DynamicSupervisor.init/1.

Will send one GPS report as no fix. Since this will effectively generate both RMC and GGA sentences, the broadcaster will produce two values

Will send one GPS report as the give position. Since this will effectively generate both RMC and GGA sentences, the broadcaster will produce two values

Will send one GPS report as the give position. Since this will effectively generate both RMC and GGA sentences, the broadcaster will produce two values

Open one port to be consumed. Needs to have one GPS attached to the port to work. To simulate, give port_name = :simulate. Either give just the name of the port as parameter, or a keyword list with the following format: [port_name: "<PORTNAME>", driver: "<DRIVERNAME>", speed: <SPEED_AS_INT>]. Only port_name is mandatory in the keyword list. Default values: driver: "Generic", speed: 9600

Link to this section Functions

Returns a specification to start this module under a supervisor.

See Supervisor.

Return the latest position if atteched to GPS.

Link to this function

get_running_port_names()

View Source

Return all the connected port names

Callback implementation for DynamicSupervisor.init/1.

Link to this function

reset_simulated_port_state()

View Source

Will send one GPS report as no fix. Since this will effectively generate both RMC and GGA sentences, the broadcaster will produce two values

Link to this function

send_simulated_no_fix(date_time)

View Source
Link to this function

send_simulated_position(lat, lon, alt)

View Source

Will send one GPS report as the give position. Since this will effectively generate both RMC and GGA sentences, the broadcaster will produce two values

Link to this function

send_simulated_position(lat, lon, alt, date_time)

View Source

Will send one GPS report as the give position. Since this will effectively generate both RMC and GGA sentences, the broadcaster will produce two values

Open one port to be consumed. Needs to have one GPS attached to the port to work. To simulate, give port_name = :simulate. Either give just the name of the port as parameter, or a keyword list with the following format: [port_name: "<PORTNAME>", driver: "<DRIVERNAME>", speed: <SPEED_AS_INT>]. Only port_name is mandatory in the keyword list. Default values: driver: "Generic", speed: 9600

Link to this function

start_simulator(file_name)

View Source
Link to this function

stop_port(port_name_to_stop)

View Source