Skip to content
This repository has been archived by the owner on Dec 8, 2022. It is now read-only.

Add read long value test #1477

Merged
merged 5 commits into from
Nov 5, 2019
Merged

Conversation

zshijing
Copy link
Contributor

@zshijing zshijing commented Oct 29, 2019

Description

  • Add read long value test
  • rewrite BLE_Write_Notification_Size_Greater_Than_MTU_3 test case

Checklist:

  • I have tested my changes. No regression in existing tests.
  • My code is Linted.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@ravibhagavandas
Copy link
Contributor

/bot run checks

1 similar comment
@ravibhagavandas
Copy link
Contributor

/bot run checks

BTStatus_t xStatus;
uint8_t LongReadBuffer[ bletests_LONG_WRITE_LEN ];

memset( LongReadBuffer, 49, bletests_LONG_WRITE_LEN * sizeof( uint8_t ) );
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of memset you can directly assign to {0} in the declaration above.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right now we just use the same value { '1', '1', '1', ...} that the long write test sent. It's easier to check the value on the RPi side.

BTGattResponse_t xGattResponse;
BLETESTconfirmCallback_t xConfirmEvent;
BTStatus_t xStatus;
uint8_t LongReadBuffer[ bletests_LONG_WRITE_LEN ];
Copy link
Contributor

Choose a reason for hiding this comment

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

bletests_LONG_WRITE_LEN - Can we have a separate define for the long reads, like bletests_LONG_READ_LEN

Also its better to not allocate long read buffer on stack, as it might over flow the stack buffer. Could be a static global variable instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure

@pvyawaha pvyawaha self-requested a review November 5, 2019 18:09
@ravibhagavandas
Copy link
Contributor

/bot run checks

1 similar comment
@ravibhagavandas
Copy link
Contributor

/bot run checks

@ravibhagavandas ravibhagavandas merged commit c066b49 into aws:master Nov 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants