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

Csg/feature/get-pase-data-via-rpc #27

Closed
wants to merge 38 commits into from

Conversation

wahajsyed
Copy link
Collaborator

Problem
Implement hooks to trace and send PASE data

Summary of Changes
RPC to fetch PASE data
Changes to the SDK to trace and save the PASE data
Fixes #25

wahajsyed and others added 30 commits May 4, 2021 20:19
Add document describing the dev/admin flow and building and testing
)

* Implemented ble_scan with peripheral list return.
RPC methods for Resolve and Zcl - AddNetwork and EnableNetwork implemented.
@wahajsyed wahajsyed changed the title Csg/feature/get data and rpc Csg/feature/get-pase-data-via-rpc May 28, 2021

std::string PAKE_3_key ("PAKE3");

const char * yaml_string_for_map(std::map<std::string, std::map<std::string, std::string>> *trace_map)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if there is a library or something that does this for us? Worried if there are any edge cases that might bite us.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Filed #28 to investigate

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return response;
}

std::string stringForDataBuffer(const uint8_t *start, uint16_t data_length)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you rename it to string_for_data_buffer following c++ code convention

}
}

char * response = new char [result_yaml_str.length()+1];

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you use std::string instead of new char ? the mem allocated with new is not freed anywhere

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to return a char * here so we can stick with supported ctypes primitives std:string and c++ data types are not supported.
You are right, we need to figure out a way to free this memory

@wahajsyed wahajsyed changed the base branch from csg/test_event_2.2 to csg/test_event_3.1 June 3, 2021 16:55
@wahajsyed
Copy link
Collaborator Author

@wahajsyed
Copy link
Collaborator Author

@cjandhyala - Added a todo to free the memory in the other PR, due to time sensitivity will address the issue in a later pr

@wahajsyed
Copy link
Collaborator Author

Closing this PR, with newer PR: https://github.com/chip-csg/connectedhomeip/pull/30/files

@wahajsyed wahajsyed closed this Jun 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants