nav: Custom Forms |
Top Previous Next |
The custom forms are stored on the navigation device and can be used by the user to fill out forms to report relevant information. This can e.g. be used for tracking trips or for reporting errors.
The forms can be filled out and submitted also when the navigation device is not connected to the RTCU device. In this case the forms are queued and will be transmitted when connected again. The navigation device is limited to a maximum of 30 forms at the same time.
There are two ways to create custom forms: 1.Uploading a file using navFormUploadFile. This requires that the forms have been created externally and have then been placed in the file system. It makes it possible to support many different forms by e.g. placing them on a SD Card and then just uploading the needed forms. 2.Creating a form using navFormCreate and uploading it with navFormUpload. This allows for creating forms dynamically from the VPL application using the form creation functions.
When the form has been uploaded, it can be shown to the user, either by using navFormShow if it is supported, or by the user accessing the forms menu on the navigation device and selecting the form.
When the form is shown, it may look like this: To fill out the form, the user must click on each field and enter the data. The fields marked with * are required and must be filled out before the submit button is enabled.
When the user has filled out a form and submitted it on the navigation device, the form is sent to the RTCU, where it will trigger the "Form received" event on navWaitEvent. The form can then be read using the receive functions. Note: While the RTCU is receiving the submitted form, no other communication can take place and the other navigation functions will report that the Navigation interface is busy. Note: Empty fields are not included in the received form.
To read the data, there are multiple possibilities: •Request the data for each known field. If the field is not included in the received form, the read functions will return an error that must be handled. See navFormCreate for an example of this. •Use navFormReceiveField to iterate through the form and then handle each known ID as needed. See navFormReceiveField for an example of how this can be done.
Once all the data has been read, the navFormReceiveDone function must be called to release the "Form received" event.
Form management functions
Form creation functionsThe following functions are used for creating and managing forms on the navigation device.
Receive functionsThe following functions are used for reading the contents of a form that has been received from the navigation device.
|