include/Enumerate.h File Reference

#include "rgb133control.h"

Go to the source code of this file.

Functions

int readCtrlSystemInfo (int fd, sVWSystemInfo *pSysInfo)
int readDeviceInfo (int fd, sVWDeviceInfo *pDeviceInfo)
int readDeviceParms (int fd, sVWDevice *pDevice)
const char * GetSignalState (unsigned long flags)


Function Documentation

const char* GetSignalState ( unsigned long  flags  ) 

Implementation of GetSignalState

00091 {
00092 
00093    if(flags & RGB133_VDIF_FLAG_DVI)
00094    {
00095       if(flags & RGB133_VDIF_FLAG_INTERLACED)
00096          return "Interlaced DVI";
00097       else
00098          return "DVI";
00099 
00100    }
00101    else if(flags & RGB133_VDIF_FLAG_VIDEO)
00102    {
00103       if(flags & RGB133_VDIF_FLAG_INTERLACED)
00104          return "Interlaced VideoInput";
00105       else
00106          return "VideoInput";
00107    }
00108    else if(flags & RGB133_VDIF_FLAG_SDI)
00109    {
00110       if(flags & RGB133_VDIF_FLAG_INTERLACED)
00111          return "Interlaced SDI";
00112       else
00113          return "SDI";
00114    }
00115    else if(flags & RGB133_VDIF_FLAG_DVI_DUAL_LINK)
00116    {
00117       return "DVI-DL";
00118    }
00119    else if(flags != RGB133_VDIF_FLAG_NOSIGNAL &&
00120            flags != RGB133_VDIF_FLAG_OUTOFRANGE &&
00121            flags != RGB133_VDIF_FLAG_UNRECOGNISABLE)
00122    {
00123       if(flags & RGB133_VDIF_FLAG_INTERLACED)
00124          return "Interlaced Analogue";
00125       else
00126          return "Analogue";
00127    }
00128 
00129    return "Unknown Video Input";
00130 }

int readCtrlSystemInfo ( int  fd,
sVWSystemInfo pSysInfo 
)

Implementation of readCtrlSystemInfo

00030 {
00031    int bytes_read = 0;
00032 
00033    memset(pSysInfo, 0, sizeof(sVWSystemInfo));
00034    pSysInfo->magic = VW_MAGIC_SYSTEM_INFO;
00035 
00036    bytes_read = read(fd, pSysInfo, sizeof(sVWSystemInfo));
00037    if (bytes_read <= 0)
00038    {
00039       printf("readCtrlSystemInfo: Failed to read %d bytes of control info into buffer(%p)\n",
00040             sizeof(sVWSystemInfo), pSysInfo);
00041       return -1;
00042    }
00043 
00044    return 0;
00045 }

int readDeviceInfo ( int  fd,
sVWDeviceInfo pDeviceInfo 
)

Implementation of readDeviceInfo

00051 {
00052    int bytes_read = 0;
00053 
00054    pDeviceInfo->magic = VW_MAGIC_DEVICE_INFO;
00055 
00056    bytes_read = read(fd, pDeviceInfo, sizeof(sVWDeviceInfo));
00057    if (bytes_read <= 0)
00058    {
00059       printf("readDeviceInfo: Failed to read %d bytes of device[%d] info into buffer(%p)\n",
00060             sizeof(sVWDeviceInfo), pDeviceInfo->device, pDeviceInfo);
00061       return -1;
00062    }
00063 
00064    return 0;
00065 }

int readDeviceParms ( int  fd,
sVWDevice pDevice 
)

Implementation of readDeviceParms

00071 {
00072    int bytes_read = 0;
00073 
00074    pDevice->magic = VW_MAGIC_DEVICE;
00075 
00076    bytes_read = read(fd, pDevice, sizeof(sVWDevice));
00077    if (bytes_read <= 0)
00078    {
00079       printf("readDeviceParms: Failed to read %d bytes of device[%d] info into buffer(%p)\n",
00080             sizeof(sVWDevice), pDevice->device, pDevice);
00081       return -1;
00082    }
00083 
00084    return 0;
00085 }


Generated on Fri Jan 20 10:36:57 2017 for Vision Utils by  doxygen 1.4.7