![]() |
Using the µVision Socket Interface
Application Note 198
Control and monitor µVision via the built-in TCP/IP interface
|
The UVSOCK data types are designed for easy implementation on a x86-based architecture without conversion. The table lists the types.
Data types and size
| Data Type | Width (bits) |
|---|---|
| bit | 1 |
| (unsigned) char | 8 |
| (unsigned) short | 16 |
| (unsigned) short int | 16 |
| (unsigned) int | 32 |
| (unsigned) long | 32 |
| (unsigned) long int | 32 |
| (unsigned) int64 | 64 |
| float | 32 |
| double | 64 |
| ptr | 32 |
| union | 32 |
| struct | 32 |
| func | 32 |
| string | 32 |
| enum | 32 |
| field | 32 |
Endianness
All types use the conventions of x86 processors. That is, they are byte little endian.
Integer Signing
Negative integer numbers are represented as 2's complement.
Floating Point Encoding
Floating point numbers are represented according to IEEE 754 Standard for Binary Floating-Point Arithmetic (IEEE Standard for Binary Floating-Point Arithmetic (ANSI/IEEE Std 754-1985)).
The Variant Data Type
The Variant Data Type is returned by several functions in UVSOCK and defined in VTT_TYPE. It contains a raw value that should be interpreted as indicated by the Value Type (vType). This is necessary because in some cases the result type is not known beforehand, for example, when reading a Virtual Register (VTR).
C declaration of the Variant Data Type:
Definitions of the Value Type (vType):