### Install ocppsim via Homebrew Source: https://github.com/zhongruoyu/ocppsim/blob/main/README.md Install the simulator on macOS or Linux using Homebrew. ```sh brew install zhongruoyu/tap/ocppsim ``` -------------------------------- ### Install ocppsim via Cargo Source: https://github.com/zhongruoyu/ocppsim/blob/main/README.md Install the simulator using the Rust package manager. ```sh cargo install ocppsim ``` -------------------------------- ### Sample ocppsim.toml configuration Source: https://github.com/zhongruoyu/ocppsim/blob/main/docs/usage.md A comprehensive example of the TOML configuration file, including global defaults and specific charge point profiles. The file is expected at ~/.config/ocppsim/ocppsim.toml by default. ```toml # Optional global defaults that can be overridden by charge point configs. # CLI options take precedence over config file items. protocol = "2.1" vendor = "ocppsim" model = "ocppsim" firmware = "0.1.0" log-path = "./ocppsim.log" trace-frames = false strict = false request-timeout-seconds = 30 heartbeat-seconds = 0 outbound-queue-limit = 1000 security-event-limit = 1000 security-profile = 2 basic-auth-password = "0123456789abcdef0123456789abcdef" ca-cert = "./csms-root.pem" client-cert = "./charge-point.pem" client-key = "./charge-point-key.pem" [charge-points.example] ws-url = "wss://csms.example.com/ocpp" id = "CP-001" append-cp-id = true connectors = 1 [charge-points.yard] ws-url = "wss://csms.example.com/ocpp" id = "CP-002" append-cp-id = true protocol = "1.6" connectors = 2 [charge-points.lab] ws-url = "ws://localhost:9000/ocpp/CP-003" id = "CP-003" append-cp-id = false protocol = "2.0.1" connectors = 1 log-path = "./lab-ocppsim.log" trace-frames = true strict = true outbound-queue-limit = 0 security-event-limit = 5000 ``` -------------------------------- ### Connect to CSMS from terminal UI Source: https://github.com/zhongruoyu/ocppsim/blob/main/README.md Commands to connect to a CSMS after starting the simulator. ```text connect some-profile connect ws://csms.example.com/ocpp CP-001 ``` -------------------------------- ### Start ocppsim with CSMS endpoint Source: https://github.com/zhongruoyu/ocppsim/blob/main/README.md Launch the simulator directly against a specific CSMS WebSocket URL and charge point ID. ```sh ocppsim --ws-url ws://csms.example.com/ocpp --cp-id CP-001 ``` -------------------------------- ### Run ocppsim locally Source: https://github.com/zhongruoyu/ocppsim/blob/main/README.md Start the simulator without a CSMS connection target. ```sh ocppsim ``` -------------------------------- ### View CLI Help Source: https://github.com/zhongruoyu/ocppsim/blob/main/docs/usage.md Displays the full list of available CLI options for ocppsim. ```sh ocppsim --help ``` -------------------------------- ### Run pre-merge verification checks Source: https://github.com/zhongruoyu/ocppsim/blob/main/docs/development.md Execute these commands to ensure code formatting, linting, testing, and container build integrity before merging behavior changes. ```sh cargo fmt --all --check cargo clippy --all-targets --all-features -- -D warnings cargo test --all-targets --all-features docker build . ``` -------------------------------- ### Run ocppsim in Docker Source: https://github.com/zhongruoyu/ocppsim/blob/main/README.md Execute the simulator in a Docker container with a mounted configuration file. ```sh docker run --rm -it \ -v "$PWD/ocppsim.toml:/config/ocppsim.toml:ro" \ zhongruoyu/ocppsim some-profile --config-path /config/ocppsim.toml ``` -------------------------------- ### Run ocppsim with a profile Source: https://github.com/zhongruoyu/ocppsim/blob/main/docs/usage.md Execute ocppsim using a specific profile defined in the configuration file. ```sh ocppsim some-profile ``` -------------------------------- ### Run ocppsim with named profile Source: https://github.com/zhongruoyu/ocppsim/blob/main/README.md Use a named profile from a TOML configuration file. ```sh ocppsim some-profile ocppsim some-profile --config-path ./ocppsim.toml ``` -------------------------------- ### Enable shell completions Source: https://github.com/zhongruoyu/ocppsim/blob/main/README.md Commands to enable shell auto-completion for Bash, Zsh, Fish, and PowerShell. ```sh # Bash source <(ocppsim completions bash) # Zsh source <(ocppsim completions zsh) # Fish ocppsim completions fish | source # PowerShell ocppsim completions powershell | Out-String | Invoke-Expression ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.