uddf 0.2.1 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.rubocop.yml +6 -2
- data/.rubocop_todo.yml +57 -0
- data/Gemfile.lock +33 -1
- data/README.md +38 -8
- data/lib/uddf/base/models/deco.rb +102 -0
- data/lib/uddf/base/models/dive_computer.rb +193 -0
- data/lib/uddf/base/models/generic.rb +787 -0
- data/lib/uddf/base/models/media.rb +66 -0
- data/lib/uddf/base/models.rb +6 -33
- data/lib/uddf/v300/models.rb +563 -0
- data/lib/uddf/v301/models.rb +564 -0
- data/lib/uddf/v310/models.rb +611 -0
- data/lib/uddf/v320/models.rb +632 -0
- data/lib/uddf/v321/models.rb +10 -0
- data/lib/uddf/v322/models.rb +636 -0
- data/lib/uddf/v323/models.rb +208 -1200
- data/lib/uddf/v330/models.rb +783 -0
- data/lib/uddf/v331/models.rb +796 -0
- data/lib/uddf/version.rb +1 -1
- data/lib/uddf.rb +7 -6
- data/uddf.gemspec +5 -1
- metadata +70 -6
- data/.github/workflows/main.yml +0 -16
- data/dive_files/BaMQZdEhp3djeDxQ5HyCreOntBm1-1753908953.uddf +0 -6060
- data/dive_files/Peregrine TX[93CBB2BB]#140_2025-03-21.uddf +0 -4735
- data/dive_files/Peregrine TX[93CBB2BB]#148_2025-06-26.uddf +0 -2414
- data/test_files/v330/diver_data.uddf +0 -311
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d301729953487eba28cdbcf41f808000cdb8f4faae5b801bd6a6e35f48bac273
|
4
|
+
data.tar.gz: 2d87719ebd57aee09bb79d17810412de4a7c57a8f27379943cd6cf0aace53bac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6858549aa6fbfdeb6c14159a7249e83c4a946adfee3e2002679ae18b01b35c5acd053757a90ce0beb02e3e213ea0d6889af69d02b5e34971a8f5aa4c5205d7b5
|
7
|
+
data.tar.gz: 23cfb82b484f50b174dfc5c8e294999edfb0616faf059ff6a918ccf441a6951407df47db2456387c30c49a297b2ae6adf17b6a2f5dffe970d3188ff198f99ce0
|
data/.rubocop.yml
CHANGED
@@ -1,4 +1,8 @@
|
|
1
|
-
|
1
|
+
inherit_from: .rubocop_todo.yml
|
2
|
+
|
3
|
+
plugins:
|
4
|
+
- rubocop-rake
|
5
|
+
- rubocop-rspec
|
2
6
|
|
3
7
|
AllCops:
|
4
8
|
NewCops: enable
|
@@ -25,4 +29,4 @@ Style/Documentation:
|
|
25
29
|
Exclude:
|
26
30
|
- "spec/**/*"
|
27
31
|
- "test/**/*"
|
28
|
-
- "lib/uddf
|
32
|
+
- "lib/uddf/**/*"
|
data/.rubocop_todo.yml
ADDED
@@ -0,0 +1,57 @@
|
|
1
|
+
# This configuration was generated by
|
2
|
+
# `rubocop --auto-gen-config`
|
3
|
+
# on 2025-08-24 15:31:53 UTC using RuboCop version 1.80.0.
|
4
|
+
# The point is for the user to remove these configuration records
|
5
|
+
# one by one as the offenses are removed from the code base.
|
6
|
+
# Note that changes in the inspected code, or installation of new
|
7
|
+
# versions of RuboCop, may require this file to be generated again.
|
8
|
+
|
9
|
+
# Offense count: 4
|
10
|
+
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
|
11
|
+
Metrics/AbcSize:
|
12
|
+
Max: 35
|
13
|
+
|
14
|
+
# Offense count: 1
|
15
|
+
# Configuration parameters: AllowedMethods, AllowedPatterns.
|
16
|
+
Metrics/CyclomaticComplexity:
|
17
|
+
Max: 8
|
18
|
+
|
19
|
+
# Offense count: 2
|
20
|
+
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
|
21
|
+
Metrics/MethodLength:
|
22
|
+
Max: 21
|
23
|
+
|
24
|
+
# Offense count: 1
|
25
|
+
# Configuration parameters: IgnoredMetadata.
|
26
|
+
RSpec/DescribeClass:
|
27
|
+
Exclude:
|
28
|
+
- '**/spec/features/**/*'
|
29
|
+
- '**/spec/requests/**/*'
|
30
|
+
- '**/spec/routing/**/*'
|
31
|
+
- '**/spec/system/**/*'
|
32
|
+
- '**/spec/views/**/*'
|
33
|
+
- 'spec/uddf_parser_spec.rb'
|
34
|
+
|
35
|
+
# Offense count: 3
|
36
|
+
# Configuration parameters: CountAsOne.
|
37
|
+
RSpec/ExampleLength:
|
38
|
+
Max: 7
|
39
|
+
|
40
|
+
# Offense count: 5
|
41
|
+
RSpec/MultipleExpectations:
|
42
|
+
Max: 4
|
43
|
+
|
44
|
+
# Offense count: 5
|
45
|
+
# Configuration parameters: AllowedPatterns.
|
46
|
+
# AllowedPatterns: ^expect_, ^assert_
|
47
|
+
RSpec/NoExpectationExample:
|
48
|
+
Exclude:
|
49
|
+
- 'spec/uddf_parser_spec.rb'
|
50
|
+
|
51
|
+
# Offense count: 1
|
52
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
53
|
+
# Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods, MaxChainLength.
|
54
|
+
# AllowedMethods: present?, blank?, presence, try, try!
|
55
|
+
Style/SafeNavigation:
|
56
|
+
Exclude:
|
57
|
+
- 'spec/uddf_parser_spec.rb'
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
uddf (0.
|
4
|
+
uddf (0.4.0)
|
5
5
|
nokogiri (~> 1.18)
|
6
6
|
nokogiri-happymapper
|
7
7
|
|
@@ -11,6 +11,8 @@ GEM
|
|
11
11
|
ast (2.4.3)
|
12
12
|
cgi (0.5.0)
|
13
13
|
date (3.4.1)
|
14
|
+
diff-lcs (1.6.2)
|
15
|
+
docile (1.4.1)
|
14
16
|
erb (4.0.4)
|
15
17
|
cgi (>= 0.3.3)
|
16
18
|
io-console (0.8.1)
|
@@ -47,6 +49,20 @@ GEM
|
|
47
49
|
regexp_parser (2.11.2)
|
48
50
|
reline (0.6.2)
|
49
51
|
io-console (~> 0.5)
|
52
|
+
rexml (3.4.1)
|
53
|
+
rspec (3.13.1)
|
54
|
+
rspec-core (~> 3.13.0)
|
55
|
+
rspec-expectations (~> 3.13.0)
|
56
|
+
rspec-mocks (~> 3.13.0)
|
57
|
+
rspec-core (3.13.5)
|
58
|
+
rspec-support (~> 3.13.0)
|
59
|
+
rspec-expectations (3.13.5)
|
60
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
61
|
+
rspec-support (~> 3.13.0)
|
62
|
+
rspec-mocks (3.13.5)
|
63
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
64
|
+
rspec-support (~> 3.13.0)
|
65
|
+
rspec-support (3.13.5)
|
50
66
|
rubocop (1.80.0)
|
51
67
|
json (~> 2.3)
|
52
68
|
language_server-protocol (~> 3.17.0.2)
|
@@ -64,7 +80,19 @@ GEM
|
|
64
80
|
rubocop-rake (0.7.1)
|
65
81
|
lint_roller (~> 1.1)
|
66
82
|
rubocop (>= 1.72.1)
|
83
|
+
rubocop-rspec (3.6.0)
|
84
|
+
lint_roller (~> 1.1)
|
85
|
+
rubocop (~> 1.72, >= 1.72.1)
|
67
86
|
ruby-progressbar (1.13.0)
|
87
|
+
simplecov (0.22.0)
|
88
|
+
docile (~> 1.1)
|
89
|
+
simplecov-html (~> 0.11)
|
90
|
+
simplecov_json_formatter (~> 0.1)
|
91
|
+
simplecov-cobertura (3.0.0)
|
92
|
+
rexml
|
93
|
+
simplecov (~> 0.19)
|
94
|
+
simplecov-html (0.13.2)
|
95
|
+
simplecov_json_formatter (0.1.4)
|
68
96
|
stringio (3.1.7)
|
69
97
|
unicode-display_width (3.1.5)
|
70
98
|
unicode-emoji (~> 4.0, >= 4.0.4)
|
@@ -77,8 +105,12 @@ PLATFORMS
|
|
77
105
|
DEPENDENCIES
|
78
106
|
irb
|
79
107
|
rake (~> 13.0)
|
108
|
+
rspec (~> 3.13)
|
80
109
|
rubocop (~> 1.7)
|
81
110
|
rubocop-rake (~> 0.7)
|
111
|
+
rubocop-rspec (~> 3.6)
|
112
|
+
simplecov (~> 0.21)
|
113
|
+
simplecov-cobertura (~> 3)
|
82
114
|
uddf!
|
83
115
|
|
84
116
|
BUNDLED WITH
|
data/README.md
CHANGED
@@ -16,15 +16,15 @@ Ruby parser and validator for Universal Dive Data Format (UDDF) files. Supports
|
|
16
16
|
|
17
17
|
| UDDF Version | Parser | Validator |
|
18
18
|
|--------------|--------|-----------|
|
19
|
-
| 3.0.0 |
|
20
|
-
| 3.0.1 |
|
21
|
-
| 3.1.0 |
|
22
|
-
| 3.2.0 |
|
23
|
-
| 3.2.1 |
|
24
|
-
| 3.2.2 |
|
19
|
+
| 3.0.0 | ✓ | ✓ |
|
20
|
+
| 3.0.1 | ✓ | ✓ |
|
21
|
+
| 3.1.0 | ✓ | ✓ |
|
22
|
+
| 3.2.0 | ✓ | ✓ |
|
23
|
+
| 3.2.1 | ✓ | ✓ |
|
24
|
+
| 3.2.2 | ✓ | ✓ |
|
25
25
|
| 3.2.3 | ✓ | ✓ |
|
26
|
-
| 3.3.0 |
|
27
|
-
| 3.3.1 |
|
26
|
+
| 3.3.0 | ✓ | ✓ |
|
27
|
+
| 3.3.1 | ✓ | ✓ |
|
28
28
|
|
29
29
|
> **Note**: The UDDF 3.3.0 and 3.3.1 schema files included in this gem have been locally modified to fix XML Schema validation errors that prevented them from loading with Nokogiri. These fixes address syntax issues in the original schemas but may not represent the upstream maintainers' intentions. The modifications ensure compatibility with standard XML Schema validators while preserving the core schema structure and validation rules.
|
30
30
|
|
@@ -62,6 +62,36 @@ end
|
|
62
62
|
gem 'uddf'
|
63
63
|
```
|
64
64
|
|
65
|
+
## Date Format Support
|
66
|
+
|
67
|
+
The UDDF parser supports multiple date/time formats in `<datetime>` elements:
|
68
|
+
|
69
|
+
| Format | Example | Description |
|
70
|
+
|--------|---------|-------------|
|
71
|
+
| **Full ISO 8601** | `2024-03-21T14:30:00Z` | Complete date and time with timezone |
|
72
|
+
| **Date only** | `2024-03-21` | ISO 8601 date format |
|
73
|
+
| **Year-Month** | `2024-03` | Year and month only (defaults to 1st day) |
|
74
|
+
| **Year only** | `2024` | Year only (defaults to January 1st) |
|
75
|
+
| **RFC 3339** | `2024-03-21T14:30:00+02:00` | RFC 3339 compliant timestamps |
|
76
|
+
|
77
|
+
### Date Parsing Behavior
|
78
|
+
|
79
|
+
- **Year-only format** (`YYYY`): Parsed as January 1st of that year
|
80
|
+
- **Year-month format** (`YYYY-MM`): Parsed as the 1st day of that month
|
81
|
+
- **Empty dates**: Gracefully handled without throwing errors
|
82
|
+
- **Fallback parsing**: If ISO 8601 parsing fails, falls back to RFC 3339, then general date parsing
|
83
|
+
|
84
|
+
Example usage in UDDF files:
|
85
|
+
```xml
|
86
|
+
<nextservicedate>
|
87
|
+
<datetime>2025-06</datetime> <!-- June 1st, 2025 -->
|
88
|
+
</nextservicedate>
|
89
|
+
|
90
|
+
<birthdate>
|
91
|
+
<datetime>1985</datetime> <!-- January 1st, 1985 -->
|
92
|
+
</birthdate>
|
93
|
+
```
|
94
|
+
|
65
95
|
## Architecture
|
66
96
|
|
67
97
|
The gem uses a modular architecture with version-specific models:
|
@@ -0,0 +1,102 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module UDDF
|
4
|
+
module Base
|
5
|
+
module Models
|
6
|
+
class Tissue
|
7
|
+
include HappyMapper
|
8
|
+
|
9
|
+
tag "tissue"
|
10
|
+
|
11
|
+
attribute :gas, String
|
12
|
+
attribute :half_life, Float, tag: "halflife"
|
13
|
+
attribute :number, Integer
|
14
|
+
attribute :a, Float
|
15
|
+
attribute :b, Float
|
16
|
+
end
|
17
|
+
|
18
|
+
class Hargikas
|
19
|
+
include HappyMapper
|
20
|
+
|
21
|
+
tag "hargikas"
|
22
|
+
|
23
|
+
has_one :ambient, Float
|
24
|
+
has_many :tissues, Tissue, tag: "tissue"
|
25
|
+
has_one :arterial_micro_bubble_level, Integer, tag: "arterialmicrobubbleLevel"
|
26
|
+
has_one :intrapulmonary_right_left_shunt, Float, tag: "intrapulmonaryrightleftshunt"
|
27
|
+
has_one :estimated_skin_cool_level, Integer, tag: "estimatedskincoolLevel"
|
28
|
+
end
|
29
|
+
|
30
|
+
class VPM
|
31
|
+
include HappyMapper
|
32
|
+
|
33
|
+
tag "vpm"
|
34
|
+
|
35
|
+
attribute :id, String
|
36
|
+
has_one :conservatism, Float
|
37
|
+
has_one :gamma, Float
|
38
|
+
has_one :gc, Float
|
39
|
+
has_one :lambda, Float
|
40
|
+
has_one :r0, Float
|
41
|
+
has_many :tissues, Tissue, tag: "tissue"
|
42
|
+
end
|
43
|
+
|
44
|
+
class RGBM
|
45
|
+
include HappyMapper
|
46
|
+
|
47
|
+
tag "rgbm"
|
48
|
+
|
49
|
+
attribute :id, String
|
50
|
+
has_many :tissues, Tissue, tag: "tissue"
|
51
|
+
end
|
52
|
+
|
53
|
+
class Buehlmann
|
54
|
+
include HappyMapper
|
55
|
+
|
56
|
+
tag "buehlmann"
|
57
|
+
|
58
|
+
attribute :id, String
|
59
|
+
has_many :tissues, Tissue, tag: "tissue"
|
60
|
+
end
|
61
|
+
|
62
|
+
class BuehlmannV320
|
63
|
+
include HappyMapper
|
64
|
+
|
65
|
+
tag "buehlmann"
|
66
|
+
|
67
|
+
attribute :id, String
|
68
|
+
has_one :gradient_factor_high, Float, tag: "gradientfactorhigh"
|
69
|
+
has_one :gradient_factor_low, Float, tag: "gradientfactorlow"
|
70
|
+
has_many :tissues, Tissue, tag: "tissue"
|
71
|
+
end
|
72
|
+
|
73
|
+
class DecoModel
|
74
|
+
include HappyMapper
|
75
|
+
|
76
|
+
tag "decomodel"
|
77
|
+
|
78
|
+
content :value, String
|
79
|
+
end
|
80
|
+
|
81
|
+
class DecoModelV310
|
82
|
+
include HappyMapper
|
83
|
+
|
84
|
+
tag "decomodel"
|
85
|
+
|
86
|
+
has_many :buehlmanns, Buehlmann, tag: "buehlmann"
|
87
|
+
has_many :rgbms, RGBM, tag: "rbgm"
|
88
|
+
has_many :vpms, VPM, tag: "vpm"
|
89
|
+
end
|
90
|
+
|
91
|
+
class DecoModelV320
|
92
|
+
include HappyMapper
|
93
|
+
|
94
|
+
tag "decomodel"
|
95
|
+
|
96
|
+
has_many :buehlmanns, BuehlmannV320, tag: "buehlmann"
|
97
|
+
has_many :rgbms, RGBM, tag: "rbgm"
|
98
|
+
has_many :vpms, VPM, tag: "vpm"
|
99
|
+
end
|
100
|
+
end
|
101
|
+
end
|
102
|
+
end
|
@@ -0,0 +1,193 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module UDDF
|
4
|
+
module Base
|
5
|
+
module Models
|
6
|
+
class DCAlarm
|
7
|
+
include HappyMapper
|
8
|
+
|
9
|
+
tag "dcalarm"
|
10
|
+
|
11
|
+
has_one :acknowledge, String
|
12
|
+
has_one :alarm_type, Integer, tag: "alarmtype"
|
13
|
+
has_one :period, Float
|
14
|
+
end
|
15
|
+
|
16
|
+
class SetDCDiveDepthAlarm
|
17
|
+
include HappyMapper
|
18
|
+
|
19
|
+
tag "setdcdivedethalarm"
|
20
|
+
|
21
|
+
has_one :dc_alarm, DCAlarm, tag: "dcalarm"
|
22
|
+
has_one :dc_alarm_depth, Float, tag: "dcalarmdepth"
|
23
|
+
end
|
24
|
+
|
25
|
+
class SetDCDivePo2Alarm
|
26
|
+
include HappyMapper
|
27
|
+
|
28
|
+
tag "setdcdivepo2alarm"
|
29
|
+
|
30
|
+
has_one :dc_alarm, DCAlarm, tag: "dcalarm"
|
31
|
+
has_one :maximum_po2, Float, tag: "maximumpo2"
|
32
|
+
end
|
33
|
+
|
34
|
+
class SetDCDiveSiteData
|
35
|
+
include HappyMapper
|
36
|
+
|
37
|
+
tag "setdcdivesitedata"
|
38
|
+
|
39
|
+
attribute :dive_site, String, tag: "divesite"
|
40
|
+
end
|
41
|
+
|
42
|
+
class SetDCDiveTimeAlarm
|
43
|
+
include HappyMapper
|
44
|
+
|
45
|
+
tag "setdcdivetimealarm"
|
46
|
+
|
47
|
+
has_one :dc_alarm, DCAlarm, tag: "dcalarm"
|
48
|
+
has_one :timespan, Float
|
49
|
+
end
|
50
|
+
|
51
|
+
class SetDCEndNDTAlarm
|
52
|
+
include HappyMapper
|
53
|
+
|
54
|
+
tag "setdcendndtalarm"
|
55
|
+
|
56
|
+
has_one :dc_alarm, DCAlarm, tag: "dcalarm"
|
57
|
+
end
|
58
|
+
|
59
|
+
class ApplicationDataV300
|
60
|
+
include HappyMapper
|
61
|
+
|
62
|
+
tag "applicationdata"
|
63
|
+
|
64
|
+
has_one :hargikas, Hargikas
|
65
|
+
end
|
66
|
+
|
67
|
+
class ApplicationDataV310 < ApplicationDataV300
|
68
|
+
include HappyMapper
|
69
|
+
|
70
|
+
tag "applicationdata"
|
71
|
+
|
72
|
+
has_one :deco_trainer, String, tag: "decotrainer"
|
73
|
+
end
|
74
|
+
|
75
|
+
class ApplicationDataV330 < ApplicationDataV310
|
76
|
+
include HappyMapper
|
77
|
+
|
78
|
+
has_one :apdiving, String
|
79
|
+
has_one :ratio, String
|
80
|
+
end
|
81
|
+
|
82
|
+
class SetDCDecoModelV300
|
83
|
+
include HappyMapper
|
84
|
+
|
85
|
+
tag "setdcdecomodel"
|
86
|
+
|
87
|
+
has_many :alias_names, String, tag: "aliasname"
|
88
|
+
has_one :application_data, ApplicationDataV300, tag: "applicationdata"
|
89
|
+
has_one :name, String
|
90
|
+
end
|
91
|
+
|
92
|
+
class SetDCDecoModelV310 < SetDCDecoModelV300
|
93
|
+
include HappyMapper
|
94
|
+
|
95
|
+
has_one :application_data, ApplicationDataV310, tag: "applicationdata"
|
96
|
+
end
|
97
|
+
|
98
|
+
class SetDCDecoModelV330 < SetDCDecoModelV310
|
99
|
+
include HappyMapper
|
100
|
+
|
101
|
+
has_one :application_data, ApplicationDataV330, tag: "applicationdata"
|
102
|
+
end
|
103
|
+
|
104
|
+
class SetDCBuddyData
|
105
|
+
include HappyMapper
|
106
|
+
|
107
|
+
tag "setdcbuddydata"
|
108
|
+
|
109
|
+
attribute :buddy, String
|
110
|
+
end
|
111
|
+
|
112
|
+
class SetDCDataV300
|
113
|
+
include HappyMapper
|
114
|
+
|
115
|
+
tag "setdcdata"
|
116
|
+
|
117
|
+
has_one :set_dc_alarm_time, DateTime, tag: "setdcalarmtime"
|
118
|
+
has_one :set_dc_altitude, Float, tag: "setdcaltitude"
|
119
|
+
has_one :set_dc_buddy_data, SetDCBuddyData, tag: "setdcbuddydata"
|
120
|
+
has_one :set_dc_date_time, DateTime, tag: "setdcdatetime"
|
121
|
+
has_one :set_dc_deco_model, SetDCDecoModelV300, tag: "setdcdecomodel"
|
122
|
+
has_one :set_dc_dive_depth_alarm, SetDCDiveDepthAlarm, tag: "setdcdivedethalarm"
|
123
|
+
has_one :set_dc_dive_po2_alarm, SetDCDivePo2Alarm, tag: "setdcdivepo2alarm"
|
124
|
+
has_many :set_dc_dive_site_data, SetDCDiveSiteData, tag: "setdcdivesitedata"
|
125
|
+
has_one :set_dc_dive_time_alarm, SetDCDiveTimeAlarm, tag: "setdcdivetimealarm"
|
126
|
+
has_one :set_dc_end_ndt_alarm, SetDCEndNDTAlarm, tag: "setdcendndtalarm"
|
127
|
+
has_one :set_dc_gas_definitions_data, String, tag: "setdcgasdefinitionsdata"
|
128
|
+
has_one :set_dc_owner_data, String, tag: "setdcownerdata"
|
129
|
+
has_one :set_dc_password, String, tag: "setdcpassword"
|
130
|
+
has_one :set_dc_generator_data, String, tag: "setdcgeneratordata"
|
131
|
+
end
|
132
|
+
|
133
|
+
class SetDCDataV310 < SetDCDataV300
|
134
|
+
include HappyMapper
|
135
|
+
|
136
|
+
has_one :set_dc_deco_model, SetDCDecoModelV310, tag: "setdcdecomodel"
|
137
|
+
end
|
138
|
+
|
139
|
+
class SetDCDataV330 < SetDCDataV310
|
140
|
+
include HappyMapper
|
141
|
+
|
142
|
+
has_one :set_dc_deco_model, SetDCDecoModelV330, tag: "setdcdecomodel"
|
143
|
+
end
|
144
|
+
|
145
|
+
class GetDCData
|
146
|
+
include HappyMapper
|
147
|
+
|
148
|
+
tag "getdcdata"
|
149
|
+
|
150
|
+
has_one :get_dc_all_data, String, tag: "getdcalldata"
|
151
|
+
has_one :get_dc_generator_data, String, tag: "getdcgeneratordata"
|
152
|
+
has_one :get_dc_owner_data, String, tag: "getdcownerdata"
|
153
|
+
has_one :get_dc_buddy_data, String, tag: "getdcbuddydata"
|
154
|
+
has_one :get_dc_gas_definitions_data, String, tag: "getdcgasdefinitionsdata"
|
155
|
+
has_one :get_dc_dive_site_data, String, tag: "getdcdivesitedata"
|
156
|
+
has_one :get_dc_dive_trip_data, String, tag: "getdcdivetripdata"
|
157
|
+
has_one :get_dc_profile_data, String, tag: "getdcprofiledata"
|
158
|
+
end
|
159
|
+
|
160
|
+
class DiveComputerDump
|
161
|
+
include HappyMapper
|
162
|
+
|
163
|
+
tag "divecomputerdump"
|
164
|
+
|
165
|
+
has_one :datetime, DateTime
|
166
|
+
has_one :dc_dump, String, tag: "dcdump"
|
167
|
+
has_one :link, Link
|
168
|
+
end
|
169
|
+
|
170
|
+
class DiveComputerControlV300
|
171
|
+
include HappyMapper
|
172
|
+
|
173
|
+
tag "divecomputercontrol"
|
174
|
+
|
175
|
+
has_many :dive_computer_dumps, DiveComputerDump, tag: "divecomputerdump"
|
176
|
+
has_one :get_dc_data, GetDCData, tag: "getdcdata"
|
177
|
+
has_one :set_dc_data, SetDCDataV300, tag: "setdcdata"
|
178
|
+
end
|
179
|
+
|
180
|
+
class DiveComputerControlV310 < DiveComputerControlV300
|
181
|
+
include HappyMapper
|
182
|
+
|
183
|
+
has_one :set_dc_data, SetDCDataV310, tag: "setdcdata"
|
184
|
+
end
|
185
|
+
|
186
|
+
class DiveComputerControlV330 < DiveComputerControlV310
|
187
|
+
include HappyMapper
|
188
|
+
|
189
|
+
has_one :set_dc_data, SetDCDataV330, tag: "setdcdata"
|
190
|
+
end
|
191
|
+
end
|
192
|
+
end
|
193
|
+
end
|