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

Add initial IM write client/handler[TE4] #7730

Merged

Conversation

yunhanw-google
Copy link
Contributor

@yunhanw-google yunhanw-google commented Jun 17, 2021

Problem

What is being fixed? Examples:

Change overview

Add IM write interaction implementation following the IM encoding spec
After this lands the initial IM write interaction in data model, in ticket 7661, we would integrate legacy ember architecture to replace old ember write and further integrate with them in application.

Testing

Add unit test to cover write client and write handler
Add cirque test to cover E2E run for write interaction

@todo
Copy link

todo bot commented Jun 17, 2021

temprary create a SecureSessionHandle from node id, will be fix in PR 3602

// TODO: temprary create a SecureSessionHandle from node id, will be fix in PR 3602
// TODO: Hard code keyID to 0 to unblock IM end-to-end test. Complete solution is tracked in issue:4451
if (apSecureSession == nullptr)
{
mpExchangeCtx = mpExchangeMgr->NewContext({ aNodeId, 0, aAdminId }, this);
}
else
{
mpExchangeCtx = mpExchangeMgr->NewContext(*apSecureSession, this);
}
VerifyOrExit(mpExchangeCtx != nullptr, err = CHIP_ERROR_NO_MEMORY);


This comment was generated by todo based on a TODO comment in b8248ec in #7730. cc @yunhanw-google.

@todo
Copy link

todo bot commented Jun 17, 2021

Hard code keyID to 0 to unblock IM end-to-end test. Complete solution is tracked in issue:4451

// TODO: Hard code keyID to 0 to unblock IM end-to-end test. Complete solution is tracked in issue:4451
if (apSecureSession == nullptr)
{
mpExchangeCtx = mpExchangeMgr->NewContext({ aNodeId, 0, aAdminId }, this);
}
else
{
mpExchangeCtx = mpExchangeMgr->NewContext(*apSecureSession, this);
}
VerifyOrExit(mpExchangeCtx != nullptr, err = CHIP_ERROR_NO_MEMORY);
mpExchangeCtx->SetResponseTimeout(kImMessageTimeoutMsec);


This comment was generated by todo based on a TODO comment in b8248ec in #7730. cc @yunhanw-google.

@yunhanw-google yunhanw-google requested review from andy31415 and removed request for bzbarsky-apple June 17, 2021 21:48
@yunhanw-google yunhanw-google requested review from mspang, msandstedt, jmartinez-silabs and bzbarsky-apple and removed request for mspang June 17, 2021 21:48
@yunhanw-google yunhanw-google force-pushed the feature/add_write_client_server branch from b8248ec to 2185e73 Compare June 17, 2021 21:51
@yunhanw-google yunhanw-google force-pushed the feature/add_write_client_server branch from 2185e73 to c6c0aba Compare June 18, 2021 01:39
@yunhanw-google yunhanw-google force-pushed the feature/add_write_client_server branch from c6c0aba to 77f4cd9 Compare June 18, 2021 02:33
@todo
Copy link

todo bot commented Jun 18, 2021

Add attribute version support

//TODO: Add attribute version support
attributeDataElement.DataVersion(0);
attributeDataElement.EndOfAttributeDataElement();
err = attributeDataElement.GetError();
SuccessOrExit(err);
MoveToState(State::AddAttribute);
exit:
ChipLogFunctError(err);
return err;
}


This comment was generated by todo based on a TODO comment in 77f4cd9 in #7730. cc @yunhanw-google.

@yunhanw-google yunhanw-google changed the title Add initial IM write client/handler Add initial IM write client/handler[TE4] Jun 18, 2021
@yunhanw-google yunhanw-google force-pushed the feature/add_write_client_server branch 2 times, most recently from dd3ee78 to dba9e2b Compare June 18, 2021 02:54
@yunhanw-google yunhanw-google force-pushed the feature/add_write_client_server branch from dba9e2b to b4c4eb9 Compare June 18, 2021 15:59
src/app/InteractionModelEngine.cpp Outdated Show resolved Hide resolved
src/app/InteractionModelEngine.cpp Outdated Show resolved Hide resolved
src/app/MessageDef/AttributeDataList.h Outdated Show resolved Hide resolved
src/app/MessageDef/WriteRequest.h Outdated Show resolved Hide resolved
src/app/WriteClient.cpp Outdated Show resolved Hide resolved
src/app/WriteHandler.h Outdated Show resolved Hide resolved
src/app/tests/TestWriteInteraction.cpp Outdated Show resolved Hide resolved
src/app/tests/TestWriteInteraction.cpp Outdated Show resolved Hide resolved
src/app/tests/TestWriteInteraction.cpp Show resolved Hide resolved
src/app/tests/TestWriteInteraction.cpp Outdated Show resolved Hide resolved
@yunhanw-google yunhanw-google force-pushed the feature/add_write_client_server branch from b4c4eb9 to bbf3661 Compare June 18, 2021 18:51
@yunhanw-google yunhanw-google force-pushed the feature/add_write_client_server branch from bbf3661 to eaaaa22 Compare June 18, 2021 18:53
@github-actions
Copy link

Size increase report for "gn_qpg6100-example-build" from cb9747b

File Section File VM
chip-qpg6100-lighting-example.out .text 2516 2516
chip-qpg6100-lighting-example.out .bss 0 288
chip-qpg6100-lighting-example.out .heap 0 -288
Full report output
BLOAT REPORT

Files found only in the build output:
    report.csv

Comparing ./master_artifact/chip-qpg6100-lighting-example.out.map and ./pull_artifact/chip-qpg6100-lighting-example.out.map:

BLOAT EXECUTION FAILED WITH CODE 1:
bloaty: unknown file type for file './pull_artifact/chip-qpg6100-lighting-example.out.map'

Comparing ./master_artifact/chip-qpg6100-lighting-example.out and ./pull_artifact/chip-qpg6100-lighting-example.out:

sections,vmsize,filesize
.debug_info,0,211579
.debug_line,0,31703
.debug_abbrev,0,18499
.debug_loc,0,15713
.debug_str,0,8226
.debug_ranges,0,2640
.strtab,0,2526
.text,2516,2516
.debug_frame,0,2240
.symtab,0,1536
.debug_aranges,0,744
.bss,288,0
.shstrtab,0,-2
.heap,-288,0
[Unmapped],0,-2516


@github-actions
Copy link

Size increase report for "nrfconnect-example-build" from cb9747b

File Section File VM
chip-lock.elf text 2528 2528
chip-lock.elf bss 0 288
chip-lock.elf rodata 240 236
Full report output
BLOAT REPORT

Files found only in the build output:
    report.csv

Comparing ./master_artifact/chip-shell.elf and ./pull_artifact/chip-shell.elf:

sections,vmsize,filesize

Comparing ./master_artifact/chip-lock.elf and ./pull_artifact/chip-lock.elf:

sections,vmsize,filesize
.debug_info,0,212261
.debug_line,0,27793
.debug_abbrev,0,18938
.debug_loc,0,15395
.debug_str,0,7985
.strtab,0,2815
.debug_ranges,0,2616
text,2528,2528
.debug_frame,0,2292
.symtab,0,1760
.debug_aranges,0,744
bss,288,0
rodata,236,240
.shstrtab,0,1


@woody-apple
Copy link
Contributor

This has very insufficient tests… fingers crossed we don’t regress here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add IM write interaction implementation
5 participants