Bitmap printscreen = new Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height);
Graphics graphics = Graphics.FromImage(printscreen as Image);
graphics.CopyFromScreen(0, 0, 0, 0, printscreen.Size);
var ms = new MemoryStream();
printscreen.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg);
string convertedImg = Convert.ToBase64String(ms.ToArray(), Base64FormattingOptions.None);
/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAMABVYDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRV... и т.д.
<img alt="" src="data:image/png;base64,ТУТ_ПРОБЕЛА_У_ВАС CONVERTED_BASE64"/>
между base64, и CONVERTED_BASE64)MODBUS register: 702, 801,Это адреса регистров, которые вам нужно читать/писать.
751, 851
var ModbusRTU = require("modbus-serial");Вместо address 5 подставьте нужный вам адрес. Можно читать/писать несколько регистров с последовательными адресами за раз. На каком этапе возникают трудности?
var client = new ModbusRTU();
// open connection to a serial port
client.connectRTU("/dev/ttyUSB0", {baudrate: 9600}, write);
function write() {
client.setID(1);
// write the values 0, 0xffff to registers starting at address 5
// on device number 1.
client.writeRegisters(5, [0 , 0xffff])
.then(read);
}
function read() {
// read the 2 registers starting at address 5
// on device number 1.
client.readHoldingRegisters(5, 2)
.then(console.log);
}
RewriteCond %{HTTP_USER_AGENT} !android|avantgoю.....
RewriteCond %{HTTP_USER_AGENT} !^(1207|6310|6590|3gso|4thp|5
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) index.php
RewriteCond %{HTTP_USER_AGENT} android|avantgoю.....
RewriteCond %{HTTP_USER_AGENT} ^(1207|6310|6590|3gso|4thp|5
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) mobile.php