函数 | 变量
MultiCast 命名空间参考

函数

def work_thread (cam=0, pData=0, nDataSize=0)
 
def press_any_key_exit ()
 

变量

bool g_bExit = False
 
 deviceList = MV_CC_DEVICE_INFO_LIST()
 
 tlayerType = MV_GIGE_DEVICE | MV_USB_DEVICE
 
 ret = MvCamera.MV_CC_EnumDevices(tlayerType, deviceList)
 
 mvcc_dev_info = cast(deviceList.pDeviceInfo[i], POINTER(MV_CC_DEVICE_INFO)).contents
 
string strModeName = ""
 
tuple nip1 = ((mvcc_dev_info.SpecialInfo.stGigEInfo.nCurrentIp & 0xff000000) >> 24)
 
tuple nip2 = ((mvcc_dev_info.SpecialInfo.stGigEInfo.nCurrentIp & 0x00ff0000) >> 16)
 
tuple nip3 = ((mvcc_dev_info.SpecialInfo.stGigEInfo.nCurrentIp & 0x0000ff00) >> 8)
 
tuple nip4 = (mvcc_dev_info.SpecialInfo.stGigEInfo.nCurrentIp & 0x000000ff)
 
string strSerialNumber = ""
 
 nConnectionNum = input("please input the number of the device to connect:")
 
 cam = MvCamera()
 
 stDeviceList = cast(deviceList.pDeviceInfo[int(nConnectionNum)], POINTER(MV_CC_DEVICE_INFO)).contents
 
 key = raw_input("start multicast sample in (c)ontrol or in (m)onitor mode? (c/m): ")
 
bool monitor = False
 
 nPacketSize = cam.MV_CC_GetOptimalPacketSize()
 
 stParam = MVCC_INTVALUE()
 
 nPayloadSize = stParam.nCurValue
 
string strIp = "239.192.1.1"
 
string device_ip_list = strIp.split('.')
 
tuple dest_ip = (int(device_ip_list[0]) << 24) | (int(device_ip_list[1]) << 16) | (int(device_ip_list[2]) << 8) | int(device_ip_list[3])
 
 stTransmissionType = MV_TRANSMISSION_TYPE()
 
 enTransmissionType
 
 nDestIp
 
 nDestPort
 
tuple data_buf = (c_ubyte * nPayloadSize)()
 
 hThreadHandle = threading.Thread(target=work_thread, args=(cam, byref(data_buf), nPayloadSize))
 

函数说明

◆ work_thread()

def MultiCast.work_thread (   cam = 0,
  pData = 0,
  nDataSize = 0 
)

◆ press_any_key_exit()

def MultiCast.press_any_key_exit ( )

变量说明

◆ g_bExit

bool g_bExit = False

◆ deviceList

deviceList = MV_CC_DEVICE_INFO_LIST()

◆ tlayerType

tlayerType = MV_GIGE_DEVICE | MV_USB_DEVICE

◆ ret

◆ mvcc_dev_info

mvcc_dev_info = cast(deviceList.pDeviceInfo[i], POINTER(MV_CC_DEVICE_INFO)).contents

◆ strModeName

string strModeName = ""

◆ nip1

tuple nip1 = ((mvcc_dev_info.SpecialInfo.stGigEInfo.nCurrentIp & 0xff000000) >> 24)

◆ nip2

tuple nip2 = ((mvcc_dev_info.SpecialInfo.stGigEInfo.nCurrentIp & 0x00ff0000) >> 16)

◆ nip3

tuple nip3 = ((mvcc_dev_info.SpecialInfo.stGigEInfo.nCurrentIp & 0x0000ff00) >> 8)

◆ nip4

tuple nip4 = (mvcc_dev_info.SpecialInfo.stGigEInfo.nCurrentIp & 0x000000ff)

◆ strSerialNumber

string strSerialNumber = ""

◆ nConnectionNum

nConnectionNum = input("please input the number of the device to connect:")

◆ cam

cam = MvCamera()

◆ stDeviceList

stDeviceList = cast(deviceList.pDeviceInfo[int(nConnectionNum)], POINTER(MV_CC_DEVICE_INFO)).contents

◆ key

key = raw_input("start multicast sample in (c)ontrol or in (m)onitor mode? (c/m): ")

◆ monitor

bool monitor = False

◆ nPacketSize

◆ stParam

stParam = MVCC_INTVALUE()

◆ nPayloadSize

nPayloadSize = stParam.nCurValue

◆ strIp

string strIp = "239.192.1.1"

◆ device_ip_list

string device_ip_list = strIp.split('.')

◆ dest_ip

tuple dest_ip = (int(device_ip_list[0]) << 24) | (int(device_ip_list[1]) << 16) | (int(device_ip_list[2]) << 8) | int(device_ip_list[3])

◆ stTransmissionType

stTransmissionType = MV_TRANSMISSION_TYPE()

◆ enTransmissionType

enTransmissionType

◆ nDestIp

nDestIp

◆ nDestPort

nDestPort

◆ data_buf

tuple data_buf = (c_ubyte * nPayloadSize)()

◆ hThreadHandle

hThreadHandle = threading.Thread(target=work_thread, args=(cam, byref(data_buf), nPayloadSize))