public class NovaTraffic extends Object implements NovaTrafficImp
构造器和说明 |
---|
NovaTraffic(Socket socket)
初始化通用接口,此方法可以用来公网监听端口建立连接
|
NovaTraffic(SocketChannel socketChannel) |
NovaTraffic(String ip,
int port)
初始化通用接口
|
限定符和类型 | 方法和说明 |
---|---|
int |
cleanUpFiles(int type)
清理文件
|
void |
clearPassword() |
protected Socket |
createClientSocket(String ip,
int port)
创建客户端socket
|
protected ISocket |
createISocket(String ip,
int port)
创建客户端socket
|
int |
deleteMeidaFile(String fileName)
删除媒体文件
|
int |
deletePlaylistById(int id)
根据id清理播放文件
|
TimingPolicy |
getAdvanceTiming() |
List<String> |
getAllMediaFileName()
获取所有媒体文件名称
|
List<Integer> |
getAllPlaylistId()
获取卡上全部播放列表
|
String |
getBase64Screenshot(File file)
获取当前播放截图
通过base64格式返回
|
List<BrightnessItem> |
getBrightnessAuto()
获取自动亮度调节
|
List<BrightnessByTimeParam> |
getBrightnessByTimeList()
获取定时亮度列表
|
BrightnessBean |
getBrightnessParam()
获取屏幕亮度信息
|
int |
getCloseScreenTemperature()
获取 屏体关闭温度
|
CpuAndMemoryInfo |
getCpuAndMemoryInfo() |
DeviceMemorySize |
getDeviceMemorySize()
获取设备空间
|
String |
getDeviceName()
获取设备名称
|
DeviceNTPParam |
getDeviceNTPParam()
获取ntp对时参数
|
List<DevicePowerByTimeParam> |
getDevicePowerByTimeList()
获取定时开屏列表
|
int |
getDeviceScreenshot(String filePath)
获取当前播放截图
|
boolean |
getDeviceScreenshot2()
获取媒体文件
|
DeviceSize |
getDeviceSize()
获取屏幕尺寸(宽高)
|
DeviceType |
getDeviceType()
获取控制卡状态
|
String |
getDeviceVersion()
获取控制卡版本
|
int |
getDeviceVolume()
获取音量
|
List<String> |
getFileListName(int type) |
byte[] |
getMac()
获取Mac地址
|
boolean |
getMediaFile(String savePath,
String fileName,
long timeOut)
获取媒体文件
|
DeviceNowPlayList |
getNowPlayAllContent()
获取当前播放全部内容
|
DeviceNowPlayItem |
getNowPlayContent()
获取当前播放内容
|
String |
getPingAddress()
获取自定义ping地址
|
List<PlayByTimeParam> |
getPlayByTimeList()
获取定时播放列表
|
byte[] |
getPlayConfig()
获取播放设置
|
String |
getPlayListContent(int id)
获取对应播放全部内容
|
String |
getRDSRoad()
设置路网图
|
TimingPolicy |
getRebootPolicy()
获取重启策略
|
int |
getScreenStatus()
获取屏幕状态
|
String |
getSN()
获取设备SN号
|
String |
getSpotCheckBadBlockInfo()
获取坏块信息
|
String |
getSupportedResolution()
获取内源支持分辨率
|
String |
getSurveil()
获取监控卡数据
|
TimeZoneParam |
getTimeAndTimeZone()
获取时区
|
List<VolumeByTimeParam> |
getTimingVolumeParam() |
protected byte[] |
makeSendPacket(short what,
byte[] data,
int dataSize)
用于发送加密
|
boolean |
novaTrafficSetAesPassword(String password)
收到内容 和 发送内容加密
|
boolean |
novaTrafficSetPassword(String password)
收到内容 和 发送内容加密
|
int |
playListById(int id)
指定播放列表(和下发文件一起配合使用,sendPlayList为下发播放文件+指定播放组合指令)
|
int |
removeAdvanceTiming() |
int |
removeAppPageName(String pageName)
移除app
|
int |
removeLocalUpdate(int id)
移除某个id的局部更新
|
int |
removeRebootPolicy()
移除重启策略
|
void |
resetDeviceIpToDefault()
恢复ip到出厂的192.168.0.220
|
int |
restartDevice()
重启设备
|
int |
sendFile(File file,
String saveFileName)
发送文件 NovaTraffic.sendFile(new File("d:\\001.jpg"), "001.jpg",
"192.168.0.220", 5000);
|
int |
sendFile(InputStream fis,
String saveFileName)
发送文件 NovaTraffic.sendFile(new File("d:\\001.jpg"), "001.jpg",
"192.168.0.220", 5000);
|
int |
sendFtpDownloadaddress(String url)
发送ftp下载文件地址
|
int |
sendLocalUpdate(int id,
String content)
发送局部更新。
|
int |
sendPlayList(int id,
String content)
发送播放文件。
|
int |
setAdvanceTiming(String policy) |
int |
setAutoBrightnessTimeParam(byte second,
byte count)
设置自动亮度参数
|
int |
setBoardPower(boolean power)
控制本板电源
|
int |
setBoardPowerAndScreenPower(boolean power)
控制本板电源和屏幕黑屏
|
int |
setBrightness(int brightness)
设置手动亮度调节
|
int |
setBrightnessAuto(List<BrightnessItem> brightnessItem)
设置自动亮度调节
|
int |
setBrightnessByTimeList(List<BrightnessByTimeParam> list)
设置定时亮度列表
|
int |
setCloseScreenTemperature(int value)
设置屏体关闭温度,高于此温度关屏
|
void |
setConnectTimeout(int connectTimeout)
设置连接超时时间
|
int |
setDeviceName(String name)
设置设备名称
|
void |
setDeviceNetBasicParam(DeviceNetBasicParam mDeviceBasicParam)
设置屏体基本参数
|
int |
setDeviceNTPParam(DeviceNTPParam deviceNTPParam)
设置ntp对时参数
|
int |
setDevicePowerByTimeList(List<DevicePowerByTimeParam> list)
设置定时开屏列表
|
int |
setDeviceSecretParam(DeviceSecretParam mDeviceSecretParam)
设置设备加密
|
int |
setDeviceVolume(int volume)
设置音量0-100
|
int |
setMultiFunctionCardPower(int cardIndex,
int roadIndex,
boolean power)
控制多功能卡电源
|
int |
setPingAddress(String ip)
设置自定义ping地址
|
int |
setPlayByTimeList(List<PlayByTimeParam> list)
设置定时播放列表
|
int |
setPlayConfig(boolean isAntialias,
boolean isTxtAdaptive)
设置播放配置
|
int |
setPower(boolean power)
设置开关屏
|
int |
setRDSRoad(String colors)
设置路网图
|
int |
setRebootPolicy(TimingPolicy policy)
设置重启策略
|
int |
setRelay(boolean b0,
boolean b1,
boolean b2,
boolean b3)
设置rc4继电器
|
int |
setRelayPowers(boolean power1,
boolean power2,
boolean power3,
boolean power4)
开关继电器状态
|
void |
setSoTimeout(int soTimeout)
设置SO超时时间
|
int |
setTime(Date date)
设置时间
|
int |
setTimeAndTimeZone(TimeZoneParam timeZoneParam)
设置时区
|
int |
setTimingVolumeParam(List<VolumeByTimeParam> list) |
int |
setVirtualConnection(boolean isOpen,
int secondTime,
int id)
设置虚连接播放文件
|
int |
solidify(byte flag) |
int |
spotCheckBadBlockInit()
点检需要配合lct点检功能使用,不能单独使用
|
int |
updateFileName(String path)
升级文件
|
void |
updateTJRoad(List<TJRoute> routes)
路网图内容更新
|
public NovaTraffic(Socket socket)
socket
- public NovaTraffic(String ip, int port)
ip
- port
- public NovaTraffic(SocketChannel socketChannel)
public void setConnectTimeout(int connectTimeout)
connectTimeout
- public void setSoTimeout(int soTimeout)
public String getDeviceName()
public int setDeviceName(String name)
name
- public boolean novaTrafficSetPassword(String password)
password
- public boolean novaTrafficSetAesPassword(String password)
password
- public void clearPassword()
protected ISocket createISocket(String ip, int port) throws IOException
ip
- port
- IOException
protected Socket createClientSocket(String ip, int port) throws IOException
ip
- port
- IOException
protected byte[] makeSendPacket(short what, byte[] data, int dataSize)
what
- data
- dataSize
- public int sendPlayList(int id, String content)
sendPlayList
在接口中 NovaTrafficImp
id
- 播放文件id 1 代表play001.lst文件content
- 播放内容 utf-8public int playListById(int id)
id
- public int sendLocalUpdate(int id, String content)
sendLocalUpdate
在接口中 NovaTrafficImp
id
- 局部更新idcontent
- 播放内容 utf-8public int removeLocalUpdate(int id)
id
- 移除局部更新idpublic int sendFile(File file, String saveFileName)
sendFile
在接口中 NovaTrafficImp
file
- 本地发送文件名saveFileName
- 卡上保存的文件名 utf-8编码public int sendFile(InputStream fis, String saveFileName)
fis
- 文件输入流saveFileName
- 卡上保存的文件名 utf-8编码public int setBrightness(int brightness)
brightness
- 0 - 255public int setPower(boolean power)
power
- true开 fasle 关public int getScreenStatus()
public int cleanUpFiles(int type)
type
- 0-清理所有媒体文件 1-清理无效媒体文 件 2-清理所有文件 3-清理升级包public String getSurveil()
public int setBrightnessAuto(List<BrightnessItem> brightnessItem)
brightnessItem
- 必须是8组public List<BrightnessItem> getBrightnessAuto()
public int setBoardPowerAndScreenPower(boolean power)
public int setBoardPower(boolean power)
public int setMultiFunctionCardPower(int cardIndex, int roadIndex, boolean power)
cardIndex
- 0-255 多功能卡位置索引roadIndex
- 0-7 电源路数索引power
- public DeviceType getDeviceType()
public int setTime(Date date)
date
- public int restartDevice()
public void resetDeviceIpToDefault()
public String getDeviceVersion()
public void setDeviceNetBasicParam(DeviceNetBasicParam mDeviceBasicParam)
public int setDeviceSecretParam(DeviceSecretParam mDeviceSecretParam)
mDeviceSecretParam
- public int updateFileName(String path)
path
- utf8编码public int removeAppPageName(String pageName)
pageName
- public DeviceSize getDeviceSize()
public int setDeviceVolume(int volume)
volume
- 0 -100public int getDeviceVolume()
public DeviceMemorySize getDeviceMemorySize()
public int setTimeAndTimeZone(TimeZoneParam timeZoneParam)
timeZoneParam
- public TimeZoneParam getTimeAndTimeZone()
public int setDeviceNTPParam(DeviceNTPParam deviceNTPParam)
deviceNTPParam
- public DeviceNTPParam getDeviceNTPParam()
public int setCloseScreenTemperature(int value)
value
- 系统最小值为 70 0 表示不进行关屏处理public int getCloseScreenTemperature()
public int setVirtualConnection(boolean isOpen, int secondTime, int id)
isOpen
- false-不开启 true-开启虚连接检测secondTime
- 单位秒,多长时间无数据交互开启虚连接id
- 播放文件id 1 代表play001.lst文件public int sendFtpDownloadaddress(String url)
url
- ftp://user:password@192.168.0.108:21/play001.lstpublic DeviceNowPlayItem getNowPlayContent()
public DeviceNowPlayList getNowPlayAllContent()
public String getPlayListContent(int id)
id
- 对应播放列表public int getDeviceScreenshot(String filePath)
filePath
- 截图文件名public String getBase64Screenshot(File file)
public int setDevicePowerByTimeList(List<DevicePowerByTimeParam> list)
list
- 为null 或 0 清除操作 ;新表覆盖旧表public List<DevicePowerByTimeParam> getDevicePowerByTimeList()
public int setPlayByTimeList(List<PlayByTimeParam> list)
list
- public List<PlayByTimeParam> getPlayByTimeList()
public int setBrightnessByTimeList(List<BrightnessByTimeParam> list)
list
- public List<BrightnessByTimeParam> getBrightnessByTimeList()
public int setTimingVolumeParam(List<VolumeByTimeParam> list)
public List<VolumeByTimeParam> getTimingVolumeParam()
public int spotCheckBadBlockInit()
public String getSpotCheckBadBlockInfo()
public int setRelayPowers(boolean power1, boolean power2, boolean power3, boolean power4)
power1
- power2
- power3
- power4
- public int setRDSRoad(String colors)
colors
- 全段的颜色 0 表示黑,1 表示红,2 表示绿,3 表示黄public String getRDSRoad()
public int setAutoBrightnessTimeParam(byte second, byte count)
second
- count
- public byte[] getMac()
public String getSN()
public boolean getDeviceScreenshot2()
public boolean getMediaFile(String savePath, String fileName, long timeOut)
savePath
- fileName
- public int deletePlaylistById(int id)
id
- public int deleteMeidaFile(String fileName)
fileName
- public List<String> getAllMediaFileName()
getAllMediaFileName
在接口中 NovaTrafficImp
public int setRelay(boolean b0, boolean b1, boolean b2, boolean b3)
b0
- b1
- b2
- b3
- public int setPlayConfig(boolean isAntialias, boolean isTxtAdaptive)
isAntialias
- 是否抗锯齿isTxtAdaptive
- 是否自适应public byte[] getPlayConfig()
public int setRebootPolicy(TimingPolicy policy) throws UnsupportedEncodingException
policy
- 重启策略UnsupportedEncodingException
public int removeRebootPolicy()
public TimingPolicy getRebootPolicy()
public String getSupportedResolution()
public int setPingAddress(String ip)
ip
- public String getPingAddress()
public BrightnessBean getBrightnessParam()
public CpuAndMemoryInfo getCpuAndMemoryInfo()
public int setAdvanceTiming(String policy) throws UnsupportedEncodingException
public TimingPolicy getAdvanceTiming() throws UnsupportedEncodingException
public int removeAdvanceTiming()
public int solidify(byte flag)
Copyright © 2023. All rights reserved.