Skip to main content

Crate braid_types

Crate braid_types 

Source
Expand description

Core types for the Braid tracking system.

This crate provides the fundamental data structures and configuration types used throughout the Braid multi-camera tracking system, including tracking parameters, camera configurations, and data storage formats.

§Features

  • with-tokio-codec: Enables CBOR packet codec for tokio-based applications
  • start-listener: Enables TCP listener utilities for HTTP servers

Modules§

braid_http
HTTP API utilities for Braid server.
timestamp_f64
Timestamp serialization for f64 format.
timestamp_opt_f64
Timestamp serialization for optional f64 format.

Structs§

BraidCameraConfig
Configuration for a single camera in the Braid system.
BraidHttpApiSharedState
Shared state for the Braid HTTP API.
CamInfo
Information about a connected camera.
CamInfoRow
Camera information record for CSV output.
CamNum
Camera number identifier.
Data2dDistortedRow
Feature detection data in raw camera coordinates.
Data2dDistortedRowF32
Lower precision version of Data2dDistortedRow for saving to disk.
DataAssocRow
Data association record linking 2D detections to 3D tracks.
FakeSyncConfig
Configuration for fake synchronization (no real synchronization).
FlydraFloatTimestampLocal
A type that represents a timestamp but is serialized to an f64.
FlydraRawUdpPacket
Raw UDP packet containing 2D feature detections.
FlydraRawUdpPoint
A 2D feature detection result transmitted via UDP.
HostClock
Host clock timestamp source.
HypothesisTestParams
Parameters for hypothesis testing in track initialization.
KalmanEstimatesRow
Kalman filter state estimate record for CSV output.
MiniArenaLocator
Locator for determining which mini arena contains a point.
PerCam
Wrapper for per-camera data.
PerCamSaveData
Per-camera data to be saved during recording.
PngImageData
PNG image data container.
PtpStamp
Newtype storing time as number of nanoseconds since Jan 1, 1970 in UTC.
PtpStampDuration
Newtype storing a duration between two PtpStamp values.
PtpSyncConfig
Configuration for PTP (Precision Time Protocol) synchronization.
RawCamName
The original camera name from the driver.
RecentStats
Statistics for recent camera activity.
RegisterNewCamera
Camera registration message sent to Braid.
RemoteCameraInfoResponse
Camera startup information sent to strand cameras.
SyncFno
Synchronized frame number across all cameras.
TextlogRow
Text log message record for CSV output.
TrackingParams
Tracking parameters
TriggerClockInfoRow
Trigger clock information record for CSV output.
Triggerbox
Triggerbox timestamp source.
TriggerboxConfig
Configuration for Triggerbox V1 hardware synchronization.
UpdateCamSettings
Camera settings update message.
UpdateFeatureDetectSettings
Feature detection settings update message.
UpdateImage
Image update message.
VersionUpdate
Information about a newer available release of Braid.
XYGridConfig
Parameters defining a 2D grid of mini arenas arranged along X and Y axes.

Enums§

BraidHttpApiCallback
API callback messages sent to Braid.
BuiServerInfo
Generic HTTP API server information
ConnectedCameraSyncState
Camera synchronization state.
FlydraTypesError
Error types for Flydra operations.
MiniArenaConfig
Configuration defining potential mini arenas.
StartCameraBackend
Camera backend selection for local camera startup.
StartSoftwareFrameRateLimit
Frame rate limiting configuration for camera startup.
TriggerType
Camera synchronization method configuration.

Constants§

ACCESS_TOKEN_TTL
Duration for which a freshly minted access token remains valid.
BRAID_EVENTS_URL_PATH
URL path for Braid events endpoint.
BRAID_EVENT_NAME
Event name for Braid events.
BRAID_METADATA_YML_FNAME
YAML filename for Braid metadata.
BRAID_QUIT_EVENT_NAME
Event name for the server-is-quitting SSE message.
BRAID_SCHEMA
Version number for the Braid metadata schema.
CALIBRATION_XML_FNAME
XML filename for camera calibration data.
CAM_INFO_CSV_FNAME
CSV filename for camera information.
CAM_SETTINGS_DIRNAME
Directory name for camera settings.
DATA2D_DISTORTED_CSV_FNAME
CSV filename for 2D distorted coordinate data.
DATA_ASSOCIATE_CSV_FNAME
CSV filename for data association records.
DEFAULT_ACQUISITION_DURATION_ALLOWED_IMPRECISION_MSEC
Default allowed imprecision for frame acquisition duration in milliseconds.
DEFAULT_MODEL_SERVER_ADDR
Default address for the model server.
EXPERIMENT_INFO_CSV_FNAME
CSV filename for experiment information.
FEATURE_DETECT_SETTINGS_DIRNAME
Directory name for feature detection settings.
IMAGES_DIRNAME
Directory name for saved images.
KALMAN_ESTIMATES_CSV_FNAME
CSV filename for Kalman filter estimates.
README_MD_FNAME
Markdown filename for README documentation.
RECONSTRUCT_LATENCY_HLOG_FNAME
HLog filename for reconstruction latency measurements.
REPROJECTION_DIST_HLOG_FNAME
HLog filename for reprojection distance measurements.
TEXTLOG_CSV_FNAME
CSV filename for text log messages.
TRIGGERBOX_SYNC_SECONDS
Duration in seconds for triggerbox synchronization.
TRIGGER_CLOCK_INFO_CSV_FNAME
CSV filename for trigger clock information.

Traits§

Source
Trait for timestamp sources.

Functions§

default_tracking_params_flat_3d
Create default tracking parameters for flat 3D tracking.
default_tracking_params_full_3d
Create default tracking parameters for full 3D tracking.
harden_prefs_file
Restrict the on-disk preferences_serde1 file backing key to owner-only access (Unix mode 0600), warning if it was previously reachable by other local users.
is_loopback
Check if a URL refers to a loopback address.
make_hypothesis_test_full3d_default
Create default hypothesis testing parameters for full 3D tracking.
parse_trusted_networks
Parse a list of CIDR strings (e.g. "100.64.0.0/10") into the network type expected by axum_token_auth::AuthConfig::trusted_networks, returning a descriptive error for the first one that fails to parse.
start_listener
Start a TCP listener for an HTTP server, minting an access token if the listen address is not loopback.
triggerbox_time
Compute the trigger time for a particular frame.

Type Aliases§

MyFloat
Floating point type used for coordinates.