You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Rename module from NIDAQmx to DAQmx
- Rename NIDAQError → DAQmxError, NIDAQWarning → DAQmxWarning
- Rename NIDAQmxVersion → DAQmxVersion
- Update all documentation, tests, and scripts
- Add trademark disclaimer for NI-DAQmx
This avoids both:
1. Registry name similarity with existing NIDAQ package
2. Potential trademark concerns with using "NIDAQmx" in package name
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CLAUDE.md
+9-3Lines changed: 9 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
4
4
5
5
## Project Overview
6
6
7
-
NIDAQmx.jl is a Julia wrapper for National Instruments NI-DAQmx driver, providing type-safe access to NI data acquisition hardware. The package uses parametric types for tasks and Julia enums instead of raw constants.
7
+
DAQmx.jl is a Julia wrapper for National Instruments NI-DAQmx driver, providing type-safe access to NI data acquisition hardware. The package uses parametric types for tasks and Julia enums instead of raw constants.
8
8
9
9
## Development Commands
10
10
@@ -15,10 +15,13 @@ julia --project -e 'using Pkg; Pkg.test()'
15
15
# Run only mock tests (no hardware required)
16
16
julia --project test/test_mock.jl
17
17
18
+
# Run only hardware tests (requires NI-DAQmx library and hardware)
19
+
julia --project test/test_hardware.jl
20
+
18
21
# Build documentation
19
22
julia --project=docs docs/make.jl
20
23
21
-
# Regenerate bindings from NIDAQmx.h (requires Clang.jl and NI-DAQmx SDK)
24
+
# Regenerate bindings from DAQmx.h (requires Clang.jl and NI-DAQmx SDK)
22
25
julia --project=gen gen/generator.jl
23
26
```
24
27
@@ -32,7 +35,7 @@ Task{K<:TaskKind} where K in {AnalogInputKind, AnalogOutputKind, DigitalInputKin
32
35
Type aliases: `AITask`, `AOTask`, `DITask`, `DOTask`, `CITask`, `COTask`
33
36
34
37
### Source Organization
35
-
-`src/generated/` - Auto-generated from NIDAQmx.h via Clang.jl (types.jl, constants.jl, functions.jl)
38
+
-`src/generated/` - Auto-generated from DAQmx.h via Clang.jl (types.jl, constants.jl, functions.jl)
36
39
-`src/library.jl` - Library loading and version detection
37
40
-`src/errors.jl` - Error handling with `@check` macro that wraps all DAQmx calls
38
41
-`src/types.jl` - Task types, channel types, and Julia enums (TerminalConfig, Edge, SampleMode, etc.)
-**Task finalizers**: Tasks register finalizers to auto-cleanup handles via `DAQmxClearTask`
49
52
-**Channel functions return task**: Functions like `add_ai_voltage!` return the task for method chaining
50
53
-**Library availability**: `is_library_available()` checks if NI-DAQmx is installed; tests and code paths adapt accordingly
54
+
-**Convenience constructors**: Task types have convenience constructors that create task + add channel in one call: `AITask("Dev1/ai0")`, `AOTask("Dev1/ao0")`, `DITask("Dev1/port0/line0")`, `CITask("Dev1/ctr0"; method=:count_edges)`
51
55
52
56
### Generated Bindings
53
57
The `gen/` directory contains Clang.jl configuration. Bindings are pre-generated and committed; regeneration requires:
54
58
1. NI-DAQmx SDK installed with header file
55
59
2. Update paths in `gen/generator.toml` if needed
56
60
3. Run `julia --project=gen gen/generator.jl`
57
61
62
+
**Note on Ref/Ptr types**: Generated functions use `Ref{T}` for output parameters but the ccall uses `Ptr{T}`. When calling these functions, pass `Ref` values which Julia automatically converts to pointers. For `Ptr{TaskHandle}` specifically, use `Base.unsafe_convert(Ptr{TaskHandle}, handle_ref)`.
63
+
58
64
### Testing Strategy
59
65
-`test/test_mock.jl` - Tests type definitions, enums, error handling, and API patterns without hardware
60
66
-`test/test_hardware.jl` - Integration tests requiring NI-DAQmx hardware (skipped if library unavailable or no devices detected)
Copy file name to clipboardExpand all lines: api_overview.md
+13-13Lines changed: 13 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# NIDAQmx.jl API Reference
1
+
# DAQmx.jl API Reference
2
2
3
3
Julia wrapper for National Instruments NI-DAQmx driver, providing type-safe access to NI data acquisition hardware.
4
4
@@ -10,7 +10,7 @@ Julia wrapper for National Instruments NI-DAQmx driver, providing type-safe acce
10
10
11
11
## Key Concepts
12
12
13
-
NIDAQmx.jl uses parametric task types (`Task{K}`) where `K` indicates the task kind (analog input, digital output, etc.). This enables type-safe dispatch and compile-time guarantees about valid operations. Tasks automatically clean up handles via finalizers. Julia enums replace raw DAQmx constants for terminal configuration, edges, and sample modes.
13
+
DAQmx.jl uses parametric task types (`Task{K}`) where `K` indicates the task kind (analog input, digital output, etc.). This enables type-safe dispatch and compile-time guarantees about valid operations. Tasks automatically clean up handles via finalizers. Julia enums replace raw DAQmx constants for terminal configuration, edges, and sample modes.
14
14
15
15
## Types
16
16
@@ -20,10 +20,10 @@ NIDAQmx.jl uses parametric task types (`Task{K}`) where `K` indicates the task k
20
20
Task{K<:TaskKind}
21
21
```
22
22
23
-
A NIDAQmx task parameterized by kind for type-safe dispatch.
23
+
A DAQmx task parameterized by kind for type-safe dispatch.
24
24
25
25
**Fields:**
26
-
-`handle::TaskHandle`: The underlying NIDAQmx task handle
26
+
-`handle::TaskHandle`: The underlying DAQmx task handle
0 commit comments