OpENer - Open Source EtherNet/IP(TM) I/O Target Stack  2.1
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
xorshiftrandom.c File Reference
#include "xorshiftrandom.h"
Include dependency graph for xorshiftrandom.c:

Go to the source code of this file.

Functions

void CalculateNextSeed (void)
 Pseudo-random number algorithm The algorithm used to create the pseudo-random numbers. Works directly on the file global variable. More...
 
uint32_t NextXorShiftUint32 (void)
 Returns the next generated pseudo-random number. More...
 
void SetXorShiftSeed (uint32_t seed)
 Sets the initial seed for the XOR shift pseudo-random algorithm. More...
 

Function Documentation

void CalculateNextSeed ( void  )

Pseudo-random number algorithm The algorithm used to create the pseudo-random numbers. Works directly on the file global variable.

Definition at line 19 of file xorshiftrandom.c.

Referenced by NextXorShiftUint32().

Here is the caller graph for this function:

uint32_t NextXorShiftUint32 ( void  )

Returns the next generated pseudo-random number.

Returns
The next pseudo-random number

Definition at line 25 of file xorshiftrandom.c.

References CalculateNextSeed().

Here is the call graph for this function:

void SetXorShiftSeed ( uint32_t  seed)

Sets the initial seed for the XOR shift pseudo-random algorithm.

< File-global variable holding the current seed

Definition at line 11 of file xorshiftrandom.c.