-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add README documentation for port drayage #617
Conversation
@@ -0,0 +1,73 @@ | |||
## Introduction | |||
The Port Drayage Plugin in V2x-Hub facilitates infrastructure, vehicle and container handling equipment (CHE) communication for port drayage operations. The plugin provides and montior drayage actions for a freight truck inside and between a mock port and staging area. The list of actions includes ENTER_STAGING_AREA, PICKUP, EXIT_STAGING_AREA, ENTER_PORT, DROPOFF, PORT_CHECKPOINT, HOLDING_AREA, and EXIT_PORT. | |||
### Deployment Instructions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to include V2X-Hub deployment instructions, just instructions specific to port drayage plugin
|
||
Open another tab and type in `localhost:8090` to navigate to port drayage web UI. Click `Staging Area` or `Port Area` button to test V2x-Hub located at staging or port area. | ||
|
||
Open a terminal, and run [a python script](https://raw.githubusercontent.com/usdot-fhwa-OPS/V2X-Hub/develop/configuration/mysql/suntrax/momscript_port_drayage.py) to send mocked mobility operation message to test each action at a particular location. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any documentation about step to regression test this functionality can go under a section
Regression Test
or
Functionality Test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally this page should have similar topic to
Port Drayage Plugin Documentation
Introduction
Introduce functionality
Configuration/Deployment
Any plugin specific configuration/deployment steps for plugin.
Example, under recently updated initialization script you must select to enable port drayage functionality when prompted to deploy port drayage plugin(
V2X-Hub/configuration/initialization.sh
Line 35 in cea762d
read -r -p "Enable Port Drayage functionality (TRUE/FALSE, or press Enter to use default as $PORT_DRAYAGE_ENABLED_DEFAULT): " PORT_DRAYAGE_ENABLED |
Functionality Testing or Regression Testing
How to use your script to test if functionality is deployed correctly
Remember this is for external users that may not be developers so our documentation should always use existing scripts instead of manual commands where possible and be high level enough for less technical people to for their purposes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can probably improve this documentation using the existing documentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To improve this script in the future I recommend passing in arguments link IP and udp port and using python ArgParser to help document your script and how to use it similar to https://github.com/usdot-fhwa-stol/carma-streets/blob/develop/collect_kafka_logs.py. Using this will allow you to document what your script is for and help text to appear for the script and the arguments.
Another potential improvement is to use the python shebang #!/usr/bin/python3
and remove the file extension. This makes calls to you script more concise and abstracts away to implementation specifics from users calling you script.
# Current call you your script
python3 momscript_port_drayage.py <arguments>
# with shebang
./momscript_port_drayage <arguments>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another future improvement is that your script could also listen for outgoing messages from immediate forward. So essentially you send a message then your script waits until it gets a response before "driving to the next location for 5 seconds" and then sending its next message. This way your script can test both receiving functionality and sending functionality.
Quality Gate passedIssues Measures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Look good.
PR Details
Description
Add README documentation for port drayage
Related Issue
CF-859
Motivation and Context
Update documentation
How Has This Been Tested?
Local Integration testing
Types of changes
Checklist:
V2XHUB Contributing Guide