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

Enabling list attriubtes on the app clusters and updating the TV example app #6582

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
14 changes: 7 additions & 7 deletions examples/all-clusters-app/all-clusters-common/gen/af-structs.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ typedef struct _AudioOutputInfo
{
uint8_t index;
uint8_t outputType;
uint8_t * name;
chip::ByteSpan name;
} EmberAfAudioOutputInfo;

// Struct for BasicCommissioningInfoType
Expand Down Expand Up @@ -282,8 +282,8 @@ typedef struct _MediaInputInfo
{
uint8_t index;
uint8_t inputType;
uint8_t * name;
uint8_t * description;
chip::ByteSpan name;
chip::ByteSpan description;
} EmberAfMediaInputInfo;

// Struct for MediaPlaybackPosition
Expand All @@ -297,7 +297,7 @@ typedef struct _MediaPlaybackPosition
typedef struct _NavigateTargetTargetInfo
{
uint8_t identifier;
uint8_t * name;
chip::ByteSpan name;
} EmberAfNavigateTargetTargetInfo;

// Struct for NeighborInfo
Expand Down Expand Up @@ -597,9 +597,9 @@ typedef struct _TvChannelInfo
{
uint16_t majorNumber;
uint16_t minorNumber;
uint8_t * name;
uint8_t * callSign;
uint8_t * affiliateCallSign;
chip::ByteSpan name;
chip::ByteSpan callSign;
chip::ByteSpan affiliateCallSign;
} EmberAfTvChannelInfo;

// Struct for TvChannelLineupInfo
Expand Down
14 changes: 7 additions & 7 deletions examples/bridge-app/bridge-common/gen/af-structs.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ typedef struct _AudioOutputInfo
{
uint8_t index;
uint8_t outputType;
uint8_t * name;
chip::ByteSpan name;
} EmberAfAudioOutputInfo;

// Struct for BasicCommissioningInfoType
Expand Down Expand Up @@ -282,8 +282,8 @@ typedef struct _MediaInputInfo
{
uint8_t index;
uint8_t inputType;
uint8_t * name;
uint8_t * description;
chip::ByteSpan name;
chip::ByteSpan description;
} EmberAfMediaInputInfo;

// Struct for MediaPlaybackPosition
Expand All @@ -297,7 +297,7 @@ typedef struct _MediaPlaybackPosition
typedef struct _NavigateTargetTargetInfo
{
uint8_t identifier;
uint8_t * name;
chip::ByteSpan name;
} EmberAfNavigateTargetTargetInfo;

// Struct for NeighborInfo
Expand Down Expand Up @@ -597,9 +597,9 @@ typedef struct _TvChannelInfo
{
uint16_t majorNumber;
uint16_t minorNumber;
uint8_t * name;
uint8_t * callSign;
uint8_t * affiliateCallSign;
chip::ByteSpan name;
chip::ByteSpan callSign;
chip::ByteSpan affiliateCallSign;
} EmberAfTvChannelInfo;

// Struct for TvChannelLineupInfo
Expand Down
141 changes: 127 additions & 14 deletions examples/chip-tool/commands/clusters/Commands.h
Original file line number Diff line number Diff line change
Expand Up @@ -660,6 +660,61 @@ static void OnTestClusterClusterTestSpecificResponse(void * context, uint8_t ret
command->SetCommandExitStatus(true);
}

static void OnApplicationLauncherApplicationLauncherListListAttributeResponse(void * context, uint16_t count, uint16_t * entries)
{
ChipLogProgress(chipTool, "OnApplicationLauncherApplicationLauncherListListAttributeResponse: %lu entries", count);

for (uint16_t i = 0; i < count; i++)
{
ChipLogProgress(chipTool, "INT16U[%lu]: %" PRIu16 "", i, entries[i]);
}

ModelCommand * command = reinterpret_cast<ModelCommand *>(context);
command->SetCommandExitStatus(true);
}

static void OnAudioOutputAudioOutputListListAttributeResponse(void * context, uint16_t count, _AudioOutputInfo * entries)
{
ChipLogProgress(chipTool, "OnAudioOutputAudioOutputListListAttributeResponse: %lu entries", count);

for (uint16_t i = 0; i < count; i++)
{
ChipLogProgress(chipTool, "AudioOutputInfo[%lu]:", i);
ChipLogProgress(chipTool, " index: %" PRIu8 "", entries[i].index);
ChipLogProgress(chipTool, " outputType: %" PRIu8 "", entries[i].outputType);
ChipLogProgress(chipTool, " name: %s", entries[i].name);
}

ModelCommand * command = reinterpret_cast<ModelCommand *>(context);
command->SetCommandExitStatus(true);
}

static void OnContentLaunchAcceptsHeaderListListAttributeResponse(void * context, uint16_t count, chip::ByteSpan * entries)
{
ChipLogProgress(chipTool, "OnContentLaunchAcceptsHeaderListListAttributeResponse: %lu entries", count);

for (uint16_t i = 0; i < count; i++)
{
ChipLogProgress(chipTool, "OCTET_STRING[%lu]: %s", i, entries[i]);
}

ModelCommand * command = reinterpret_cast<ModelCommand *>(context);
command->SetCommandExitStatus(true);
}

static void OnContentLaunchSupportedStreamingTypesListAttributeResponse(void * context, uint16_t count, uint8_t * entries)
{
ChipLogProgress(chipTool, "OnContentLaunchSupportedStreamingTypesListAttributeResponse: %lu entries", count);

for (uint16_t i = 0; i < count; i++)
{
ChipLogProgress(chipTool, "ContentLaunchStreamingType[%lu]: %" PRIu8 "", i, entries[i]);
}

ModelCommand * command = reinterpret_cast<ModelCommand *>(context);
command->SetCommandExitStatus(true);
}

static void OnDescriptorDeviceListListAttributeResponse(void * context, uint16_t count, _DeviceType * entries)
{
ChipLogProgress(chipTool, "OnDescriptorDeviceListListAttributeResponse: %lu entries", count);
Expand Down Expand Up @@ -768,6 +823,23 @@ static void OnGroupKeyManagementGroupKeysListAttributeResponse(void * context, u
command->SetCommandExitStatus(true);
}

static void OnMediaInputMediaInputListListAttributeResponse(void * context, uint16_t count, _MediaInputInfo * entries)
{
ChipLogProgress(chipTool, "OnMediaInputMediaInputListListAttributeResponse: %lu entries", count);

for (uint16_t i = 0; i < count; i++)
{
ChipLogProgress(chipTool, "MediaInputInfo[%lu]:", i);
ChipLogProgress(chipTool, " index: %" PRIu8 "", entries[i].index);
ChipLogProgress(chipTool, " inputType: %" PRIu8 "", entries[i].inputType);
ChipLogProgress(chipTool, " name: %s", entries[i].name);
ChipLogProgress(chipTool, " description: %s", entries[i].description);
}

ModelCommand * command = reinterpret_cast<ModelCommand *>(context);
command->SetCommandExitStatus(true);
}

static void OnOperationalCredentialsFabricsListListAttributeResponse(void * context, uint16_t count, _FabricDescriptor * entries)
{
ChipLogProgress(chipTool, "OnOperationalCredentialsFabricsListListAttributeResponse: %lu entries", count);
Expand All @@ -784,6 +856,40 @@ static void OnOperationalCredentialsFabricsListListAttributeResponse(void * cont
command->SetCommandExitStatus(true);
}

static void OnTvChannelTvChannelListListAttributeResponse(void * context, uint16_t count, _TvChannelInfo * entries)
{
ChipLogProgress(chipTool, "OnTvChannelTvChannelListListAttributeResponse: %lu entries", count);

for (uint16_t i = 0; i < count; i++)
{
ChipLogProgress(chipTool, "TvChannelInfo[%lu]:", i);
ChipLogProgress(chipTool, " majorNumber: %" PRIu16 "", entries[i].majorNumber);
ChipLogProgress(chipTool, " minorNumber: %" PRIu16 "", entries[i].minorNumber);
ChipLogProgress(chipTool, " name: %s", entries[i].name);
ChipLogProgress(chipTool, " callSign: %s", entries[i].callSign);
ChipLogProgress(chipTool, " affiliateCallSign: %s", entries[i].affiliateCallSign);
}

ModelCommand * command = reinterpret_cast<ModelCommand *>(context);
command->SetCommandExitStatus(true);
}

static void OnTargetNavigatorTargetNavigatorListListAttributeResponse(void * context, uint16_t count,
_NavigateTargetTargetInfo * entries)
{
ChipLogProgress(chipTool, "OnTargetNavigatorTargetNavigatorListListAttributeResponse: %lu entries", count);

for (uint16_t i = 0; i < count; i++)
{
ChipLogProgress(chipTool, "NavigateTargetTargetInfo[%lu]:", i);
ChipLogProgress(chipTool, " identifier: %" PRIu8 "", entries[i].identifier);
ChipLogProgress(chipTool, " name: %s", entries[i].name);
}

ModelCommand * command = reinterpret_cast<ModelCommand *>(context);
command->SetCommandExitStatus(true);
}

static void OnTestClusterListInt8uListAttributeResponse(void * context, uint16_t count, uint8_t * entries)
{
ChipLogProgress(chipTool, "OnTestClusterListInt8uListAttributeResponse: %lu entries", count);
Expand Down Expand Up @@ -1474,8 +1580,9 @@ class ReadApplicationLauncherApplicationLauncherList : public ModelCommand
}

private:
chip::Callback::Callback<StringAttributeCallback> * onSuccessCallback =
new chip::Callback::Callback<StringAttributeCallback>(OnStringAttributeResponse, this);
chip::Callback::Callback<ApplicationLauncherApplicationLauncherListListAttributeCallback> * onSuccessCallback =
new chip::Callback::Callback<ApplicationLauncherApplicationLauncherListListAttributeCallback>(
OnApplicationLauncherApplicationLauncherListListAttributeResponse, this);
chip::Callback::Callback<DefaultFailureCallback> * onFailureCallback =
new chip::Callback::Callback<DefaultFailureCallback>(OnDefaultFailureResponse, this);
};
Expand Down Expand Up @@ -1655,8 +1762,9 @@ class ReadAudioOutputAudioOutputList : public ModelCommand
}

private:
chip::Callback::Callback<StringAttributeCallback> * onSuccessCallback =
new chip::Callback::Callback<StringAttributeCallback>(OnStringAttributeResponse, this);
chip::Callback::Callback<AudioOutputAudioOutputListListAttributeCallback> * onSuccessCallback =
new chip::Callback::Callback<AudioOutputAudioOutputListListAttributeCallback>(
OnAudioOutputAudioOutputListListAttributeResponse, this);
chip::Callback::Callback<DefaultFailureCallback> * onFailureCallback =
new chip::Callback::Callback<DefaultFailureCallback>(OnDefaultFailureResponse, this);
};
Expand Down Expand Up @@ -6173,8 +6281,9 @@ class ReadContentLaunchAcceptsHeaderList : public ModelCommand
}

private:
chip::Callback::Callback<StringAttributeCallback> * onSuccessCallback =
new chip::Callback::Callback<StringAttributeCallback>(OnStringAttributeResponse, this);
chip::Callback::Callback<ContentLaunchAcceptsHeaderListListAttributeCallback> * onSuccessCallback =
new chip::Callback::Callback<ContentLaunchAcceptsHeaderListListAttributeCallback>(
OnContentLaunchAcceptsHeaderListListAttributeResponse, this);
chip::Callback::Callback<DefaultFailureCallback> * onFailureCallback =
new chip::Callback::Callback<DefaultFailureCallback>(OnDefaultFailureResponse, this);
};
Expand Down Expand Up @@ -6207,8 +6316,9 @@ class ReadContentLaunchSupportedStreamingTypes : public ModelCommand
}

private:
chip::Callback::Callback<StringAttributeCallback> * onSuccessCallback =
new chip::Callback::Callback<StringAttributeCallback>(OnStringAttributeResponse, this);
chip::Callback::Callback<ContentLaunchSupportedStreamingTypesListAttributeCallback> * onSuccessCallback =
new chip::Callback::Callback<ContentLaunchSupportedStreamingTypesListAttributeCallback>(
OnContentLaunchSupportedStreamingTypesListAttributeResponse, this);
chip::Callback::Callback<DefaultFailureCallback> * onFailureCallback =
new chip::Callback::Callback<DefaultFailureCallback>(OnDefaultFailureResponse, this);
};
Expand Down Expand Up @@ -9531,8 +9641,9 @@ class ReadMediaInputMediaInputList : public ModelCommand
}

private:
chip::Callback::Callback<StringAttributeCallback> * onSuccessCallback =
new chip::Callback::Callback<StringAttributeCallback>(OnStringAttributeResponse, this);
chip::Callback::Callback<MediaInputMediaInputListListAttributeCallback> * onSuccessCallback =
new chip::Callback::Callback<MediaInputMediaInputListListAttributeCallback>(OnMediaInputMediaInputListListAttributeResponse,
this);
chip::Callback::Callback<DefaultFailureCallback> * onFailureCallback =
new chip::Callback::Callback<DefaultFailureCallback>(OnDefaultFailureResponse, this);
};
Expand Down Expand Up @@ -12224,8 +12335,9 @@ class ReadTvChannelTvChannelList : public ModelCommand
}

private:
chip::Callback::Callback<StringAttributeCallback> * onSuccessCallback =
new chip::Callback::Callback<StringAttributeCallback>(OnStringAttributeResponse, this);
chip::Callback::Callback<TvChannelTvChannelListListAttributeCallback> * onSuccessCallback =
new chip::Callback::Callback<TvChannelTvChannelListListAttributeCallback>(OnTvChannelTvChannelListListAttributeResponse,
this);
chip::Callback::Callback<DefaultFailureCallback> * onFailureCallback =
new chip::Callback::Callback<DefaultFailureCallback>(OnDefaultFailureResponse, this);
};
Expand Down Expand Up @@ -12439,8 +12551,9 @@ class ReadTargetNavigatorTargetNavigatorList : public ModelCommand
}

private:
chip::Callback::Callback<StringAttributeCallback> * onSuccessCallback =
new chip::Callback::Callback<StringAttributeCallback>(OnStringAttributeResponse, this);
chip::Callback::Callback<TargetNavigatorTargetNavigatorListListAttributeCallback> * onSuccessCallback =
new chip::Callback::Callback<TargetNavigatorTargetNavigatorListListAttributeCallback>(
OnTargetNavigatorTargetNavigatorListListAttributeResponse, this);
chip::Callback::Callback<DefaultFailureCallback> * onFailureCallback =
new chip::Callback::Callback<DefaultFailureCallback>(OnDefaultFailureResponse, this);
};
Expand Down
Loading