File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # AGENTS.md - TeslaBLE Development Guide
2+
3+ ## Build Commands
4+ ``` bash
5+ cmake -B build -DCMAKE_MESSAGE_LOG_LEVEL=ERROR && cmake --build build -j8 2>&1 | grep -E " error:|Error:|Built target|failed" | head -20 || true
6+ cd build && ctest -j1 --output-on-failure 2>&1 | grep -E " (FAILED.*\]|^[0-9]+% tests|expected equality|Which is:|tests/.*:.*:.*Failure|Failed to)"
7+ ```
8+
9+ ## Architecture
10+ - ** Library** : C++23 library for Tesla vehicle BLE communication
11+ - ** Core Classes** : ` Client ` (main API), ` CryptoContext ` (keys/EC), ` Peer ` (sessions per domain)
12+ - ** Domains** : VEHICLE_SECURITY, INFOTAINMENT (via ` UniversalMessage_Domain ` )
13+ - ** Protocol** : Protobuf messages (nanopb), AES-GCM encryption (mbedtls)
14+ - ** Dependencies** : nanopb, mbedtls, googletest
15+ - ** Generated Code** : ` generated/src/*.pb.c ` , ` generated/include/*.pb.h `
16+
17+ ## Code Style
18+ - ** Namespace** : ` TeslaBLE `
19+ - ** Naming** : ` PascalCase ` classes, ` snake_case ` functions, ` _ ` suffix for members (` crypto_context_ ` )
20+ - ** Types** : Use ` pb_byte_t ` , ` pb_size_t ` for protobuf; ` std::array ` , ` std::unique_ptr `
21+ - ** Error Handling** : Return ` TeslaBLE_Status_E ` enum (0=OK); use ` LOG_ERROR ` /` LOG_DEBUG ` macros
22+ - ** Formatting** : No comments unless requested; 4-space indent; braces on same line
23+ - ** Protobuf** : Use ` *_init_default ` /` *_init_zero ` ; encode with ` pb_encode_fields ` , decode with ` pb_decode `
You can’t perform that action at this time.
0 commit comments