Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add dis characteristics uuid #477

Merged
merged 4 commits into from
Nov 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions services/ble/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
add_library(services.ble ${EMIL_EXCLUDE_FROM_ALL} STATIC)

protocol_buffer_echo_cpp(services.ble Gap.proto)
protocol_buffer_csharp(services.ble Gap.proto)
protocol_buffer_java(services.ble Gap.proto)

protocol_buffer_echo_cpp(services.ble Gatt.proto)
protocol_buffer_csharp(services.ble Gatt.proto)
protocol_buffer_java(services.ble Gatt.proto)

target_link_libraries(services.ble PUBLIC
hal.interfaces
infra.util
Expand Down
File renamed without changes.
14 changes: 14 additions & 0 deletions services/ble/Gatt.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,20 @@ namespace services
};
};

namespace uuid
{
constexpr inline AttAttribute::Uuid16 deviceInformationService{ 0x180A };
constexpr inline AttAttribute::Uuid16 systemId{ 0x2A23 };
constexpr inline AttAttribute::Uuid16 modelNumber{ 0x2A24 };
constexpr inline AttAttribute::Uuid16 serialNumber{ 0x2A25 };
constexpr inline AttAttribute::Uuid16 firmwareRevision{ 0x2A26 };
constexpr inline AttAttribute::Uuid16 hardwareRevision{ 0x2A27 };
constexpr inline AttAttribute::Uuid16 softwareRevision{ 0x2A28 };
constexpr inline AttAttribute::Uuid16 manufacturerName{ 0x2A29 };
constexpr inline AttAttribute::Uuid16 ieeeCertification{ 0x2A2A };
constexpr inline AttAttribute::Uuid16 pnpId{ 0x2A50 };
}

class GattCharacteristic
{
public:
Expand Down
20 changes: 20 additions & 0 deletions services/ble/Gatt.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
syntax = "proto3";

import "EchoAttributes.proto";

package gatt;
option java_package = "com.philips.emil.ProtobufEcho";
option java_outer_classname = "GattProto";

message DisServiceData
{
bytes manufacturerName = 1 [(bytes_size) = 32];
bytes modelNumber = 2 [(bytes_size) = 32];
bytes serialNumber = 3 [(bytes_size) = 32];
bytes hardwareRevision = 4 [(bytes_size) = 32];
bytes firmwareRevision = 5 [(bytes_size) = 32];
bytes softwareRevision = 6 [(bytes_size) = 32];
bytes systemId = 7 [(bytes_size) = 8];
bytes ieeeRegulatoryCertificationDataList = 8 [(bytes_size) = 32];
bytes pnpId = 9 [(bytes_size) = 7];
}
4 changes: 0 additions & 4 deletions services/network/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ protocol_buffer_echo_cpp(services.network Network.proto)
protocol_buffer_csharp(services.network Network.proto)
protocol_buffer_java(services.network Network.proto)

protocol_buffer_echo_cpp(services.network Gap.proto)
protocol_buffer_csharp(services.network Gap.proto)
protocol_buffer_java(services.network Gap.proto)

target_link_libraries(services.network PUBLIC
infra.syntax
infra.timer
Expand Down