src/VirtualShield.cpp
/// <summary>
/// Writes all EPtr values to the communication channel.
/// </summary>
/// <param name="serviceName">Name of the service.</param>
/// <param name="values">The values.</param>
/// <param name="count">The count of values.</param>
/// <returns>The new id of the message or a negative error.</returns>

Writes all EPtr values to the communication channel.

Name of the service.
The values.
The count of values.
The new id of the message or a negative error.
Writes all EPtr values to the communication channel . Name of the service . The values . The count of values . The new id of the message or a negative error .
int VirtualShield::writeAll(const char* serviceName, EPtr values[], unsigned int count, Attr extraAttributes[], int extraAttributeCount, const char sensorType) {
	uint8_t id = beginWrite(serviceName);
	for (size_t i = 0; i < count; i++)
	{
		write(values[i]);
	}
	if (sensorType)
	{
		write(EPtr(TYPE, sensorType));
	}
	for (int i = 0; i < extraAttributeCount; i++)
	{
		write(extraAttributes[i]);
	}
	if (endWrite() != SERIAL_SUCCESS) return SERIAL_ERROR;
	return id;
}
int VirtualShield :: writeAll ( const char * serviceName , EPtr values [ ] , unsigned int count , Attr extraAttributes [ ] , int extraAttributeCount , const char sensorType ) { uint8_t id = beginWrite ( serviceName ) ; for ( size_t i = 0 ; i < count ; i ++ ) { write ( values [ i ] ) ; } if ( sensorType ) { write ( EPtr ( TYPE , sensorType ) ) ; } for ( int i = 0 ; i < extraAttributeCount ; i ++ ) { write ( extraAttributes [ i ] ) ; } if ( endWrite ( ) != SERIAL_SUCCESS ) return SERIAL_ERROR ; return id ; }
<summary>
Writes all EPtr values to the communication channel.
<summary > Writes all EPtr values to the communication channel .