-
Notifications
You must be signed in to change notification settings - Fork 5
utils
Sudheer edited this page Mar 19, 2023
·
2 revisions
Class of of reusable generic methods methods for random number generation
local utils = require('service_utils.common.utils');
Generate random integer of 4 bytes
none
rand_int: integer
Generates a random byte buffer of size given by input parameter len
len: integer
buf: CDATA (hex_data_s_type*), hex_data_s_type is defined in lua_schema.core_utils and is used across service_utils as the representation of binary data buffer.
Returns the name of OS on which the program is being run (equivalent of uname)
none
osname: string
Loads a lua module implmented as a dynamic library. It is expected that the loader function is of the format luaopen_
libname: string extension: optional, string, in case of OSX dynamic libraries can be of extension dylib or so and in linux it is always so
lib: table, loaded module