C# 클래스 rv.PJLinkConnection

Simple class to control networked projectors via the PJLink protocol. See full spec here: http://pjlink.jbmia.or.jp/english/data/PJLink%20Specifications100.pdf This library was written in one day, so don't expect perfection. Most information must be fetched from commands after execution (sendCommand). For most common tasks, there are some shortcuts available in the PJLinkConnectionPJLinkConnection class. Basic usage: // Create connection object, communicating with projector with IP 192.168.1.14 // Projector has authentication enabled, password is rv (ignored if auth disabled) PJLinkConnection c = new PJLinkConnection("192.168.1.14", "rv"); //using shortcuts c.turnOn(); c.turnOff(); System.Console.WriteLine(c.getProjectorInfo()); //using low(er) level commands ErrorStatusCommand esc = new ErrorStatusCommand(); if (c.sendCommand(esc) == Command.Response.SUCCESS) Console.WriteLine(esc.dumpToString()); else Console.WriteLine("Communication Error");
파일 보기 프로젝트 열기: rit-sse-mycroft/app-projector 1 사용 예제들

공개 메소드들

메소드 설명
PJLinkConnection ( string host ) : System
PJLinkConnection ( string host, int port ) : System
PJLinkConnection ( string host, int port, string passwd ) : System
PJLinkConnection ( string host, string passwd ) : System
getFullProjectorInfo ( ) : rv.ProjectorInfo
getProjectorInfo ( ) : string

Return String in the form Manufacturer Product (ProjectorName) or Manufacturer Product if no projector name is set.

powerQuery ( ) : PowerCommand.PowerStatus

Check power state of Projector. Returns unknown in case of an error

sendCommand ( Command cmd ) : Command.Response
sendCommandAsync ( Command cmd, Command resultCallback ) : void

Sends a command asynchronously. The specified resultCallback will be called when the command has executed.

turnOff ( ) : bool

Turn off projector. Returns true if projector answered with SUCCESS

turnOn ( ) : bool

Turn on projector. Returns true if projector answered with SUCCESS

비공개 메소드들

메소드 설명
closeConnection ( ) : void
getMD5Hash ( string input ) : string
initConnection ( ) : bool

메소드 상세

PJLinkConnection() 공개 메소드

public PJLinkConnection ( string host ) : System
host string
리턴 System

PJLinkConnection() 공개 메소드

public PJLinkConnection ( string host, int port ) : System
host string
port int
리턴 System

PJLinkConnection() 공개 메소드

public PJLinkConnection ( string host, int port, string passwd ) : System
host string
port int
passwd string
리턴 System

PJLinkConnection() 공개 메소드

public PJLinkConnection ( string host, string passwd ) : System
host string
passwd string
리턴 System

getFullProjectorInfo() 공개 메소드

public getFullProjectorInfo ( ) : rv.ProjectorInfo
리턴 rv.ProjectorInfo

getProjectorInfo() 공개 메소드

Return String in the form Manufacturer Product (ProjectorName) or Manufacturer Product if no projector name is set.
public getProjectorInfo ( ) : string
리턴 string

powerQuery() 공개 메소드

Check power state of Projector. Returns unknown in case of an error
public powerQuery ( ) : PowerCommand.PowerStatus
리턴 PowerCommand.PowerStatus

sendCommand() 공개 메소드

public sendCommand ( Command cmd ) : Command.Response
cmd Command
리턴 Command.Response

sendCommandAsync() 공개 메소드

Sends a command asynchronously. The specified resultCallback will be called when the command has executed.
public sendCommandAsync ( Command cmd, Command resultCallback ) : void
cmd Command
resultCallback Command
리턴 void

turnOff() 공개 메소드

Turn off projector. Returns true if projector answered with SUCCESS
public turnOff ( ) : bool
리턴 bool

turnOn() 공개 메소드

Turn on projector. Returns true if projector answered with SUCCESS
public turnOn ( ) : bool
리턴 bool