|
Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:06:47) [MSC v.1914 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
>>>
RESTART: C:\Users\Administrator.SC-201905201543\Desktop\vestor\vestor\sis数据获取-py37.py
Traceback (most recent call last):
File "C:\Users\Administrator.SC-201905201543\Desktop\vestor\vestor\sis数据获取-py37.py", line 15, in <module>
class TagData(Structure):
NameError: name 'Structure' is not defined
>>>
代码如下 :
# -*- coding: utf-8 -*-
import os
import time
#from ctypes import *
import pymysql
import datetime
DLL_PATH = os.path.dirname(__file__) + '\\'
DLL_FILE = os.path.join(DLL_PATH, 'RTDBInterface.dll')
INI_FILE = os.path.join(DLL_PATH, 'VeStore.ini')
class TagData(Structure):
_fields_ = [('value', c_double), ('time', c_long), ('status', c_int)]
class ReadHiDataRequest(Structure):
_fields_ = [('stTime', c_long), ('enTime', c_long), ('tPeriod', c_long), ('reqType', c_int),
('pointName', c_char_p)]
|
|