Searched refs:payloadSize (Results 1 – 4 of 4) sorted by relevance
/packages/apps/Car/libs/connected-device-lib/src/com/android/car/connecteddevice/ble/ |
D | BlePacketFactory.java | 65 int payloadSize = payload.length; in makeBlePackets() local 66 int totalPackets = getTotalPacketNumber(messageId, payloadSize, maxSize); in makeBlePackets() 68 - getPacketHeaderSize(totalPackets, messageId, Math.min(payloadSize, maxSize)); in makeBlePackets() 71 int end = Math.min(payloadSize, maxPayloadSize); in makeBlePackets() 80 end = Math.min(start + maxPayloadSize, payloadSize); in makeBlePackets() 90 static int getPacketHeaderSize(int totalPackets, int messageId, int payloadSize) { in getPacketHeaderSize() argument 94 + getEncodedSize(payloadSize) + FIELD_NUMBER_ENCODING_SIZE; in getPacketHeaderSize() 101 static int getTotalPacketNumber(int messageId, int payloadSize, int maxSize) in getTotalPacketNumber() argument 105 + getEncodedSize(Math.min(payloadSize, maxSize)) + FIELD_NUMBER_ENCODING_SIZE; in getTotalPacketNumber() 114 int totalPackets = (int) Math.ceil(payloadSize / (double) maxPayloadSize); in getTotalPacketNumber() [all …]
|
/packages/apps/Car/libs/connected-device-lib/tests/unit/src/com/android/car/connecteddevice/ble/ |
D | BlePacketFactoryTest.java | 41 int payloadSize = 2; in testGetHeaderSize() local 54 assertThat(BlePacketFactory.getPacketHeaderSize(totalPackets, messageId, payloadSize)) in testGetHeaderSize() 63 int payloadSize = 100; in testGetTotalPackets_withVarintSize1_returnsCorrectPackets() local 70 assertThat(BlePacketFactory.getTotalPacketNumber(messageId, payloadSize, maxSize)) in testGetTotalPackets_withVarintSize1_returnsCorrectPackets() 79 int payloadSize = 6000; in testGetTotalPackets_withVarintSize2_returnsCorrectPackets() local 86 assertThat(BlePacketFactory.getTotalPacketNumber(messageId, payloadSize, maxSize)) in testGetTotalPackets_withVarintSize2_returnsCorrectPackets() 95 int payloadSize = 1000000; in testGetTotalPackets_withVarintSize3_returnsCorrectPackets() local 102 assertThat(BlePacketFactory.getTotalPacketNumber(messageId, payloadSize, maxSize)) in testGetTotalPackets_withVarintSize3_returnsCorrectPackets() 111 int payloadSize = 178400320; in testGetTotalPackets_withVarintSize4_returnsCorrectPackets() local 118 assertThat(BlePacketFactory.getTotalPacketNumber(messageId, payloadSize, maxSize)) in testGetTotalPackets_withVarintSize4_returnsCorrectPackets()
|
/packages/services/Car/service/src/com/android/car/trust/ |
D | BLEMessageV1Factory.java | 140 int payloadSize = payload.length; in makeBLEMessages() local 142 maxSize - getProtoHeaderSize(operation, payloadSize, isPayloadEncrypted); in makeBLEMessages() 143 if (payloadSize <= maxPayloadSize) { in makeBLEMessages() 147 int totalPackets = (int) Math.ceil((double) payloadSize / maxPayloadSize); in makeBLEMessages() 160 end = Math.min(start + maxPayloadSize, payloadSize); in makeBLEMessages() 170 static int getProtoHeaderSize(OperationType operation, int payloadSize, in getProtoHeaderSize() argument 178 int payloadEncodingSize = FIELD_NUMBER_ENCODING_SIZE + getEncodedSize(payloadSize); in getProtoHeaderSize()
|
/packages/apps/Car/SystemUpdater/src/com/android/car/systemupdater/ |
D | UpdateParser.java | 55 long payloadSize = 0; in parse() local 74 payloadSize = fileSize; in parse() 91 return new ParsedUpdate(file, payloadOffset, payloadSize, props); in parse()
|