OpENer - Open Source EtherNet/IP(TM) I/O Target Stack  2.1
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
random.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright (c) 2017, Rockwell Automation, Inc.
3  * All rights reserved.
4  *
5  ******************************************************************************/
6 
7 #ifndef OPENER_RANDOM_H_
8 #define OPENER_RANDOM_H_
9 
10 #include <stdint.h>
11 
12 typedef void (*SetSeed)(uint32_t seed);
13 typedef uint32_t (*GetNextUInt32)(void);
14 
15 typedef struct {
16  uint32_t current_seed_value;
19 } Random;
20 
23 
24 void RandomDelete(Random **random);
25 
26 #endif /* OPENER_RANDOM_H_ */
Definition: random.h:15
SetSeed set_seed
Definition: random.h:17
Random * RandomNew(SetSeed, GetNextUInt32)
Definition: random.c:11
uint32_t current_seed_value
Definition: random.h:16
uint32_t(* GetNextUInt32)(void)
Definition: random.h:13
void RandomDelete(Random **random)
Definition: random.c:19
void(* SetSeed)(uint32_t seed)
Definition: random.h:12
GetNextUInt32 get_next_uint32
Definition: random.h:18