Knowledge Center

Changing parameter types (casting)

Data Flows support various types of values such as integers, floating point values, and of 32 and 64 bit length. But often these parameters are predetermined as 64 bit (e.g., evaluated values) and you may desire to shrink them down for use in an outgoing packet.

Type

Let’s examine 3 parameters created in a data flow.

The evaluator outputs a single constant value of 123.456 while the decommutator uses a simple map extracting a 32 and 64 bit floating point value.

All of these parameters will move through the data flow as 64 bit values.

Commutating

Let’s assume we know that 32 bits are acceptable for the values (both the extracted 32 and 64 bit) and we want to pack these up into a packet to send out (commutate them) and not waste space, or perhaps we need to make the packet fit a predetermined design for the downstream consumer. Let’s look at the commutation step.

The commutator uses a map to define and lay out the packet format. It’s in this map where we can redefine (or “reformat”) these parameters to be the length (bit size) we desire.

The values will be cast from one type to the other, so if a floating point value is larger than the 32 bits, you will have overflow and undesirable results.

Integers

You can also reformat integer values. Extracted integers also move through the data flow as 64 bit values, but integers can be reformatted/cast to whatever size you desire. For instance,

Is NetAcquire a good fit for your project?

Our applications engineers will discuss your needs and offer advice and pricing for the solutions we can provide.
NetAcquire provides quick responses to phone and email queries during Pacific Time business hours.

Call us toll free: 888-675-1122 or email [email protected]

For Employment, Business Affairs and other NetAcquire Contacts, CONTACT US

NetAcquire Corporation