Update qng_wrapper_linux.py
Fix for linux-part of qng wrapper (added missing DeviceID)
This commit is contained in:
parent
e2294a9c9f
commit
572940bc0b
1 changed files with 9 additions and 0 deletions
|
|
@ -35,10 +35,19 @@ class QngWrapperLinux:
|
||||||
self._qwqng_wrapper.RandNormal.restype = c_double
|
self._qwqng_wrapper.RandNormal.restype = c_double
|
||||||
self._qwqng_wrapper.RandBytes.argtypes = [c_void_p, c_int]
|
self._qwqng_wrapper.RandBytes.argtypes = [c_void_p, c_int]
|
||||||
self._qwqng_wrapper.RandBytes.restype = POINTER(c_char)
|
self._qwqng_wrapper.RandBytes.restype = POINTER(c_char)
|
||||||
|
self._qwqng_wrapper.DeviceID.argtypes = [c_void_p]
|
||||||
|
self._qwqng_wrapper.DeviceID.restype = POINTER(c_char)
|
||||||
self._qwqng_wrapper.Clear.argtypes = [c_void_p]
|
self._qwqng_wrapper.Clear.argtypes = [c_void_p]
|
||||||
self._qwqng_wrapper.Reset.argtypes = [c_void_p]
|
self._qwqng_wrapper.Reset.argtypes = [c_void_p]
|
||||||
self._qng_pointer = self._qwqng_wrapper.GetQwqngInstance()
|
self._qng_pointer = self._qwqng_wrapper.GetQwqngInstance()
|
||||||
|
|
||||||
|
def deviceId(self):
|
||||||
|
try:
|
||||||
|
return self._qwqng_wrapper.DeviceID(self._qng_pointer)
|
||||||
|
except:
|
||||||
|
self._qwqng_wrapper.Reset()
|
||||||
|
return self._qwqng_wrapper.DeviceID(self._qng_pointer)
|
||||||
|
|
||||||
def randint32(self):
|
def randint32(self):
|
||||||
try:
|
try:
|
||||||
return self._qwqng_wrapper.RandInt32(self._qng_pointer)
|
return self._qwqng_wrapper.RandInt32(self._qng_pointer)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue