docs: sync docs with code; fix Makefile modules target
Makefile: - Add reconciler and ingest to the `modules` target; they were only built as side-effects of `make node`, making `make modules` incomplete planning.md: - Add 4 missing CLI drivers: discovery_cli, config_cli, protocol_cli, query_cli (all existed in code and dev/cli/Makefile but were absent) - Add header-only utilities table: stream_stats.h, v4l2_fmt.h README.md: - Add transport_cli, discovery_cli, config_cli, protocol_cli, query_cli to CLI tools list conventions.md: - Add ERR_NOT_FOUND to Error_Code enum example - Replace placeholder Invalid_Error_Detail with actual fields (config_line, message) that have been in use since config module - Add missing error macros: APP_INVALID_ERROR, APP_INVALID_ERROR_MSG, APP_NOT_FOUND_ERROR - Update directory structure: node/ description (was "later"), add web/ and tools/ entries Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -77,9 +77,10 @@ Errors are returned as `struct App_Error` values. Functions that can fail return
|
||||
/* modules/common/error.h */
|
||||
|
||||
typedef enum Error_Code {
|
||||
ERR_NONE = 0,
|
||||
ERR_SYSCALL = 1, /* errno is meaningful */
|
||||
ERR_INVALID = 2,
|
||||
ERR_NONE = 0,
|
||||
ERR_SYSCALL = 1, /* errno is meaningful */
|
||||
ERR_INVALID = 2,
|
||||
ERR_NOT_FOUND = 3,
|
||||
} Error_Code;
|
||||
|
||||
struct Syscall_Error_Detail {
|
||||
@@ -87,7 +88,8 @@ struct Syscall_Error_Detail {
|
||||
};
|
||||
|
||||
struct Invalid_Error_Detail {
|
||||
/* fields added as concrete cases arise */
|
||||
int config_line; /* source line number, or 0 if not applicable */
|
||||
const char *message; /* static string describing what was wrong */
|
||||
};
|
||||
|
||||
struct App_Error {
|
||||
@@ -110,16 +112,17 @@ struct App_Error {
|
||||
#define APP_IS_OK(e) \
|
||||
((e).code == ERR_NONE)
|
||||
|
||||
#define APP_ERROR(error_code, detail_field, ...) \
|
||||
((struct App_Error){ \
|
||||
.code = (error_code), \
|
||||
.file = __FILE__, \
|
||||
.line = __LINE__, \
|
||||
.detail = { .detail_field = { __VA_ARGS__ } } \
|
||||
})
|
||||
|
||||
#define APP_SYSCALL_ERROR() \
|
||||
APP_ERROR(ERR_SYSCALL, syscall, .err_no = errno)
|
||||
/* sets ERR_SYSCALL + captures errno */
|
||||
|
||||
#define APP_INVALID_ERROR() \
|
||||
/* sets ERR_INVALID, no message */
|
||||
|
||||
#define APP_INVALID_ERROR_MSG(cfg_line, msg) \
|
||||
/* sets ERR_INVALID with config_line and message */
|
||||
|
||||
#define APP_NOT_FOUND_ERROR() \
|
||||
/* sets ERR_NOT_FOUND */
|
||||
```
|
||||
|
||||
### Presentation
|
||||
@@ -140,11 +143,13 @@ video-setup/
|
||||
modules/ - translation units; each has a .c and a Makefile
|
||||
common/ - shared types (error, base definitions); no external dependencies
|
||||
<module>/
|
||||
node/ - video node entry point and integration (later)
|
||||
node/ - video node binary (source + display sink roles)
|
||||
include/ - public headers (.h files)
|
||||
dev/ - development aids; not part of the final deliverable
|
||||
cli/ - exploratory CLI drivers, one per module
|
||||
web/ - development web UI (Node.js/Express)
|
||||
experiments/ - freeform experiments
|
||||
tools/ - build-time code generators (e.g. gen_font_atlas)
|
||||
tests/ - automated tests (later)
|
||||
Makefile - top-level build
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user