haply 1.2.0

Haply Robotics Client Library for the Inverse Service
Documentation
//! Haply Robotics Client Library
//!
//! This crate provides a Rust interface for interacting with Haply haptic devices
//! through the Haply Inverse Service. It supports both HTTP and WebSocket
//! communications for device control and state management.

#[cfg(test)]
#[path = "unit_tests.rs"]
mod unit_tests;

// Public modules for external use
pub mod device; // Core device interaction (HaplyDevice)
pub mod state; // State management and command building
pub mod interfaces; // HTTP, WebSocket, event channels
pub mod device_model; // Data structures and models
pub mod physics; // Physics simulation utilities

pub use physics as physics_model;

// Re-exports of commonly used items
pub use interfaces::{http, websocket, events};

pub use interfaces::events as events_model;

pub use device::HaplyDevice;
pub use physics::compute_total_force;
pub use physics_model::{Cube, Sphere};

// Re-export key model types for convenience
pub use device_model::{
    // Input types
    ForceInput, PositionInput, ExtensionDataInput, AngularTorqueInput, AngularPositionInput,
    // Command types
    Command, ServiceMsg, SessionMsg, ForceRenderFullStateMsg,
    Inverse3OutMsg, VerseGripOutMsg,
    Inverse3Commands, VerseGripCommands,
    Inverse3CommandClear, VerseGripCommandClear,
    SetCursorForceCmd, SetCursorPositionCmd, SetAngularTorquesCmd, SetAngularPositionCmd,
    SetTransformCmd, SetExtensionDataCmd, ProbeCmd,
    TransformPatch,
    // Configure types
    Inverse3Configure, VerseGripConfigure, SessionConfigure,
    SessionSerializationConfigure, SessionWvgSerializationConfigure, SessionWvgExtendedDataConfigure,
    PresetConfig, MountConfig, DampingConfig, ForceGateConfig,
    NavigationConfigure, NavigationConfigSnapshot, BubbleNavigationSettings, BubbleCenterSettings, CollisionDetectionSettings, ProfileConfig,
    // State/config types
    DeviceFilters, ForceGateFilter, DampingFilter,
    NavigationState, BubbleNavigationState, NavigationStatusInfo,
    NavigationFullResponse,
    SessionInfo, SessionInfoConfig, SessionInfoState, SessionInfoStatus,
    ProfileInfo, HomeReturn,
    // Primitives
    SdfPrimitive, EasingType, SymmetryMode, CenterMode,
    VerseGripDuplicateMode,
    // SDF HFX
    SdfHfxObject, SdfHfxData, SdfCommand, SdfCommandMode,
    SdfOutputConfigure, SdfObjectList,
    SdfSessionState, SdfSessionStatus, SdfSessionConfig,
};

// Re-export HTTP-specific types
pub use interfaces::http::{
    ApiResponse, DevicesResponse, ExpertStatusResponse,
    SessionListData, PairingResponse,
};