- 浏览: 391122 次
- 性别:
- 来自: 北京
文章分类
最新评论
-
fuchenggangs:
手动抛出异常后想要自动回滚@Transactional(rol ...
spring mvc 与JPA/Hibernate的整合示例 -
springdata_spring:
可以参考最新的文档:如何在eclipse jee中检出项目并转 ...
利用eclipse构建和部署maven工程 -
hzw2312:
好像这个事务不起作用呀!
@Transactional(rea ...
spring mvc 与JPA/Hibernate的整合示例 -
huhuhuhh:
类目清晰,感谢分享!
spring mvc 与JPA/Hibernate的整合示例 -
endual:
菜鸟问下,<!-- Spring Data Jpa配置 ...
spring mvc 与JPA/Hibernate的整合示例
因为项目的需要,在构思系统的架构设计上,想到了ActiveMQ.只所以选择它。开始了学习。
一、首先做了一点小功课。
1、大致了解了JMS的原理的核心API.
2、知道了这是JMS的一个实现。在apache上可以免费下载使用。还不赶快下一个去?
二、运行并观察了官方例子
1、我先在activeMQ的解压目录的bin下执行了:
启动了这的borker.
2、在一个新的cmd窗口中,我在activeMQ的解压目录的example目录下执行了:
可以看到输出了N多发送的消息文字。
3、在另一个新的cmd窗口中,我在activeMQ的解压目录的example目录下执行了:
可以看到输出了N多接收到的消息文字。
到这里,大概可以知道了mq的基本运行框架。即,由一个broker作为中间代理。接收了传输消息。两端分别是消息的供应方"Producer",负责将消息发送到"Broker",和消息的消费方"Consumer",负责取出这些消息。
三、开始构建自己的第一个MQ
1、新建一个java工程,暂叫Project1吧,由它承担"Broker"和“Producer"的角色。当然也可以完全分开。
(别忘了将activeMQ的jar包放进来,要不都是白搭)
2、在Project1中创建一自己的"Broker",这里用了一种代码实现的居说叫“EmbeddedBroker" 的Broker.还没搞明白另外一种borker怎么弄,就先从简单的开始吧
代码基本可以从例子中copy过来。
3、创建producer.
基本可以将官方例子中的ProducerTool.java稍微调整一下即可。
4、创建consumer。
这里我选择另建一个java工程(还是别忘jar包啊)。并在其中创建consumer
四、试运行自己的mq
1、首先通过“Run As”==>"Java Application", 运行Project1里的broker.启动mq代理
2、通过"Run As"==>"Java Application",运行Project1里的producer.开始往broker中发送信息
3、通过"Run As"==>"Java Application",运行Project2里的consumer.开始从broker里接收消息。
一、首先做了一点小功课。
1、大致了解了JMS的原理的核心API.
2、知道了这是JMS的一个实现。在apache上可以免费下载使用。还不赶快下一个去?
二、运行并观察了官方例子
1、我先在activeMQ的解压目录的bin下执行了:
activemq
启动了这的borker.
2、在一个新的cmd窗口中,我在activeMQ的解压目录的example目录下执行了:
ant producer
可以看到输出了N多发送的消息文字。
3、在另一个新的cmd窗口中,我在activeMQ的解压目录的example目录下执行了:
ant consumer
可以看到输出了N多接收到的消息文字。
到这里,大概可以知道了mq的基本运行框架。即,由一个broker作为中间代理。接收了传输消息。两端分别是消息的供应方"Producer",负责将消息发送到"Broker",和消息的消费方"Consumer",负责取出这些消息。
三、开始构建自己的第一个MQ
1、新建一个java工程,暂叫Project1吧,由它承担"Broker"和“Producer"的角色。当然也可以完全分开。
(别忘了将activeMQ的jar包放进来,要不都是白搭)
2、在Project1中创建一自己的"Broker",这里用了一种代码实现的居说叫“EmbeddedBroker" 的Broker.还没搞明白另外一种borker怎么弄,就先从简单的开始吧
import org.apache.activemq.broker.BrokerService; /** * This example demonstrates how to run an embedded broker inside your Java code * * */ public final class EmbeddedBroker { private EmbeddedBroker() { } public static void main(String[] args) throws Exception { BrokerService broker = new BrokerService(); broker.setUseJmx(true); broker.addConnector("tcp://localhost:61616"); broker.start(); // now lets wait forever to avoid the JVM terminating immediately Object lock = new Object(); synchronized (lock) { lock.wait(); } } }
代码基本可以从例子中copy过来。
3、创建producer.
基本可以将官方例子中的ProducerTool.java稍微调整一下即可。
package test.producer; /** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import java.util.Arrays; import java.util.ArrayList; import java.util.Date; import java.util.Iterator; import javax.jms.Connection; import javax.jms.DeliveryMode; import javax.jms.Destination; import javax.jms.MessageProducer; import javax.jms.Session; import javax.jms.TextMessage; import org.apache.activemq.ActiveMQConnection; import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.util.IndentPrinter; /** * A simple tool for publishing messages * * */ public class ProducerTool extends Thread { private Destination destination; private int messageCount = 10; private long sleepTime; private boolean verbose = true; private int messageSize = 255; private static int parallelThreads = 1; private long timeToLive; private String user = ActiveMQConnection.DEFAULT_USER; private String password = ActiveMQConnection.DEFAULT_PASSWORD; private String url = ActiveMQConnection.DEFAULT_BROKER_URL; private String subject = "MyBroker"; private boolean topic; private boolean transacted; private boolean persistent; private static Object lockResults = new Object(); public static void main(String[] args) { ArrayList<ProducerTool> threads = new ArrayList(); ProducerTool producerTool = new ProducerTool(); producerTool.showParameters(); for (int threadCount = 1; threadCount <= parallelThreads; threadCount++) { producerTool = new ProducerTool(); //CommandLineSupport.setOptions(producerTool, args); producerTool.start(); threads.add(producerTool); } while (true) { Iterator<ProducerTool> itr = threads.iterator(); int running = 0; while (itr.hasNext()) { ProducerTool thread = itr.next(); if (thread.isAlive()) { running++; } } if (running <= 0) { System.out.println("All threads completed their work"); break; } try { Thread.sleep(1000); } catch (Exception e) { } } } public void showParameters() { System.out.println("Connecting to URL: " + url); System.out.println("Publishing a Message with size " + messageSize + " to " + (topic ? "topic" : "queue") + ": " + subject); System.out.println("Using " + (persistent ? "persistent" : "non-persistent") + " messages"); System.out.println("Sleeping between publish " + sleepTime + " ms"); System.out.println("Running " + parallelThreads + " parallel threads"); if (timeToLive != 0) { System.out.println("Messages time to live " + timeToLive + " ms"); } } public void run() { Connection connection = null; try { // Create the connection. ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(user, password, url); connection = connectionFactory.createConnection(); connection.start(); // Create the session Session session = connection.createSession(transacted, Session.AUTO_ACKNOWLEDGE); if (topic) { destination = session.createTopic(subject); } else { destination = session.createQueue(subject); } // Create the producer. MessageProducer producer = session.createProducer(destination); if (persistent) { producer.setDeliveryMode(DeliveryMode.PERSISTENT); } else { producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT); } if (timeToLive != 0) { producer.setTimeToLive(timeToLive); } // Start sending messages sendLoop(session, producer); System.out.println("[" + this.getName() + "] Done."); synchronized (lockResults) { ActiveMQConnection c = (ActiveMQConnection) connection; System.out.println("[" + this.getName() + "] Results:\n"); c.getConnectionStats().dump(new IndentPrinter()); } } catch (Exception e) { System.out.println("[" + this.getName() + "] Caught: " + e); e.printStackTrace(); } finally { try { connection.close(); } catch (Throwable ignore) { } } } protected void sendLoop(Session session, MessageProducer producer) throws Exception { /*for (int i = 0; i < messageCount || messageCount == 0; i++) { TextMessage message = session.createTextMessage(createMessageText(i)); if (verbose) { String msg = message.getText(); if (msg.length() > 50) { msg = msg.substring(0, 50) + "..."; } System.out.println("[" + this.getName() + "] Sending message: '" + msg + "'"); } producer.send(message); if (transacted) { System.out.println("[" + this.getName() + "] Committing " + messageCount + " messages"); session.commit(); } Thread.sleep(sleepTime); }*/ TextMessage message = session.createTextMessage("Hello World."); producer.send(message); } private String createMessageText(int index) { StringBuffer buffer = new StringBuffer(messageSize); buffer.append("Message: " + index + " sent at: " + new Date()); if (buffer.length() > messageSize) { return buffer.substring(0, messageSize); } for (int i = buffer.length(); i < messageSize; i++) { buffer.append(' '); } return buffer.toString(); } public void setPersistent(boolean durable) { this.persistent = durable; } public void setMessageCount(int messageCount) { this.messageCount = messageCount; } public void setMessageSize(int messageSize) { this.messageSize = messageSize; } public void setPassword(String pwd) { this.password = pwd; } public void setSleepTime(long sleepTime) { this.sleepTime = sleepTime; } public void setSubject(String subject) { this.subject = subject; } public void setTimeToLive(long timeToLive) { this.timeToLive = timeToLive; } public void setParallelThreads(int parallelThreads) { if (parallelThreads < 1) { parallelThreads = 1; } this.parallelThreads = parallelThreads; } public void setTopic(boolean topic) { this.topic = topic; } public void setQueue(boolean queue) { this.topic = !queue; } public void setTransacted(boolean transacted) { this.transacted = transacted; } public void setUrl(String url) { this.url = url; } public void setUser(String user) { this.user = user; } public void setVerbose(boolean verbose) { this.verbose = verbose; } }
4、创建consumer。
这里我选择另建一个java工程(还是别忘jar包啊)。并在其中创建consumer
package test.consumer; /** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import java.io.IOException; import java.util.Arrays; import java.util.ArrayList; import java.util.Iterator; import javax.jms.Connection; import javax.jms.DeliveryMode; import javax.jms.Destination; import javax.jms.ExceptionListener; import javax.jms.JMSException; import javax.jms.Message; import javax.jms.MessageConsumer; import javax.jms.MessageListener; import javax.jms.MessageProducer; import javax.jms.Session; import javax.jms.TextMessage; import javax.jms.Topic; import org.apache.activemq.ActiveMQConnection; import org.apache.activemq.ActiveMQConnectionFactory; /** * A simple tool for consuming messages * * */ public class ConsumerTool extends Thread implements MessageListener, ExceptionListener { private boolean running; private Session session; private Destination destination; private MessageProducer replyProducer; private boolean pauseBeforeShutdown = false; private boolean verbose = true; private int maxiumMessages; private static int parallelThreads = 1; private String subject = "MyBroker"; private boolean topic; private String user = ActiveMQConnection.DEFAULT_USER; private String password = ActiveMQConnection.DEFAULT_PASSWORD; private String url = ActiveMQConnection.DEFAULT_BROKER_URL; private boolean transacted; private boolean durable; private String clientId; private int ackMode = Session.AUTO_ACKNOWLEDGE; private String consumerName = "James"; private long sleepTime; private long receiveTimeOut; private long batch = 10; // Default batch size for CLIENT_ACKNOWLEDGEMENT or SESSION_TRANSACTED private long messagesReceived = 0; public static void main(String[] args) { ArrayList<ConsumerTool> threads = new ArrayList(); ConsumerTool consumerTool = new ConsumerTool(); consumerTool.showParameters(); for (int threadCount = 1; threadCount <= parallelThreads; threadCount++) { consumerTool = new ConsumerTool(); //CommandLineSupport.setOptions(consumerTool, args); consumerTool.start(); threads.add(consumerTool); } while (true) { Iterator<ConsumerTool> itr = threads.iterator(); int running = 0; while (itr.hasNext()) { ConsumerTool thread = itr.next(); if (thread.isAlive()) { running++; } } if (running <= 0) { System.out.println("All threads completed their work"); break; } try { Thread.sleep(1000); } catch (Exception e) { } } Iterator<ConsumerTool> itr = threads.iterator(); while (itr.hasNext()) { ConsumerTool thread = itr.next(); } } public void showParameters() { System.out.println("Connecting to URL: " + url); System.out.println("Consuming " + (topic ? "topic" : "queue") + ": " + subject); System.out.println("Using a " + (durable ? "durable" : "non-durable") + " subscription"); System.out.println("Running " + parallelThreads + " parallel threads"); } public void run() { try { running = true; ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(user, password, url); Connection connection = connectionFactory.createConnection(); if (durable && clientId != null && clientId.length() > 0 && !"null".equals(clientId)) { connection.setClientID(clientId); } connection.setExceptionListener(this); connection.start(); session = connection.createSession(transacted, ackMode); if (topic) { destination = session.createTopic(subject); } else { destination = session.createQueue(subject); } replyProducer = session.createProducer(null); replyProducer.setDeliveryMode(DeliveryMode.NON_PERSISTENT); MessageConsumer consumer = null; if (durable && topic) { consumer = session.createDurableSubscriber((Topic) destination, consumerName); } else { consumer = session.createConsumer(destination); } if (maxiumMessages > 0) { consumeMessagesAndClose(connection, session, consumer); } else { if (receiveTimeOut == 0) { consumer.setMessageListener(this); } else { consumeMessagesAndClose(connection, session, consumer, receiveTimeOut); } } } catch (Exception e) { System.out.println("[" + this.getName() + "] Caught: " + e); e.printStackTrace(); } } public void onMessage(Message message) { messagesReceived++; try { if (message instanceof TextMessage) { TextMessage txtMsg = (TextMessage) message; if (verbose) { String msg = txtMsg.getText(); int length = msg.length(); if (length > 50) { msg = msg.substring(0, 50) + "..."; } System.out.println("[" + this.getName() + "] Received: '" + msg + "' (length " + length + ")"); } } else { if (verbose) { System.out.println("[" + this.getName() + "] Received: '" + message + "'"); } } if (message.getJMSReplyTo() != null) { replyProducer.send(message.getJMSReplyTo(), session.createTextMessage("Reply: " + message.getJMSMessageID())); } if (transacted) { if ((messagesReceived % batch) == 0) { System.out.println("Commiting transaction for last " + batch + " messages; messages so far = " + messagesReceived); session.commit(); } } else if (ackMode == Session.CLIENT_ACKNOWLEDGE) { if ((messagesReceived % batch) == 0) { System.out.println("Acknowledging last " + batch + " messages; messages so far = " + messagesReceived); message.acknowledge(); } } } catch (JMSException e) { System.out.println("[" + this.getName() + "] Caught: " + e); e.printStackTrace(); } finally { if (sleepTime > 0) { try { Thread.sleep(sleepTime); } catch (InterruptedException e) { } } } } public synchronized void onException(JMSException ex) { System.out.println("[" + this.getName() + "] JMS Exception occured. Shutting down client."); running = false; } synchronized boolean isRunning() { return running; } protected void consumeMessagesAndClose(Connection connection, Session session, MessageConsumer consumer) throws JMSException, IOException { System.out.println("[" + this.getName() + "] We are about to wait until we consume: " + maxiumMessages + " message(s) then we will shutdown"); for (int i = 0; i < maxiumMessages && isRunning();) { Message message = consumer.receive(1000); if (message != null) { i++; onMessage(message); } } System.out.println("[" + this.getName() + "] Closing connection"); consumer.close(); session.close(); connection.close(); if (pauseBeforeShutdown) { System.out.println("[" + this.getName() + "] Press return to shut down"); System.in.read(); } } protected void consumeMessagesAndClose(Connection connection, Session session, MessageConsumer consumer, long timeout) throws JMSException, IOException { System.out.println("[" + this.getName() + "] We will consume messages while they continue to be delivered within: " + timeout + " ms, and then we will shutdown"); Message message; while ((message = consumer.receive(timeout)) != null) { onMessage(message); } System.out.println("[" + this.getName() + "] Closing connection"); consumer.close(); session.close(); connection.close(); if (pauseBeforeShutdown) { System.out.println("[" + this.getName() + "] Press return to shut down"); System.in.read(); } } public void setAckMode(String ackMode) { if ("CLIENT_ACKNOWLEDGE".equals(ackMode)) { this.ackMode = Session.CLIENT_ACKNOWLEDGE; } if ("AUTO_ACKNOWLEDGE".equals(ackMode)) { this.ackMode = Session.AUTO_ACKNOWLEDGE; } if ("DUPS_OK_ACKNOWLEDGE".equals(ackMode)) { this.ackMode = Session.DUPS_OK_ACKNOWLEDGE; } if ("SESSION_TRANSACTED".equals(ackMode)) { this.ackMode = Session.SESSION_TRANSACTED; } } public void setClientId(String clientID) { this.clientId = clientID; } public void setConsumerName(String consumerName) { this.consumerName = consumerName; } public void setDurable(boolean durable) { this.durable = durable; } public void setMaxiumMessages(int maxiumMessages) { this.maxiumMessages = maxiumMessages; } public void setPauseBeforeShutdown(boolean pauseBeforeShutdown) { this.pauseBeforeShutdown = pauseBeforeShutdown; } public void setPassword(String pwd) { this.password = pwd; } public void setReceiveTimeOut(long receiveTimeOut) { this.receiveTimeOut = receiveTimeOut; } public void setSleepTime(long sleepTime) { this.sleepTime = sleepTime; } public void setSubject(String subject) { this.subject = subject; } public void setParallelThreads(int parallelThreads) { if (parallelThreads < 1) { parallelThreads = 1; } this.parallelThreads = parallelThreads; } public void setTopic(boolean topic) { this.topic = topic; } public void setQueue(boolean queue) { this.topic = !queue; } public void setTransacted(boolean transacted) { this.transacted = transacted; } public void setUrl(String url) { this.url = url; } public void setUser(String user) { this.user = user; } public void setVerbose(boolean verbose) { this.verbose = verbose; } public void setBatch(long batch) { this.batch = batch; } }
四、试运行自己的mq
1、首先通过“Run As”==>"Java Application", 运行Project1里的broker.启动mq代理
2、通过"Run As"==>"Java Application",运行Project1里的producer.开始往broker中发送信息
3、通过"Run As"==>"Java Application",运行Project2里的consumer.开始从broker里接收消息。
发表评论
-
spring mvc 与JPA/Hibernate的整合示例
2013-07-17 16:53 36082一、首先通过maven加入spring、jpa和hiberna ... -
【JPA】基础知识
2012-03-04 20:22 1072JPA是java编程领域的ORM标准。最著名的参考实现是hib ... -
JAXB的基本应用
2012-02-29 00:13 1385JAXB(Java API for XML Binding)是 ... -
log4j的应用与配置
2012-01-31 22:25 1309在java编程领域,log4j已经是事实上的日志输出工具。不但 ... -
springsecurity学习笔之二:实现一个基于数据库的简单权限系统
2012-01-23 14:35 2136这里在一个web工程中,通过三张表,实现用户、角色、权限的关系 ... -
springsecurity学习笔记之一:安全架构的理解
2012-01-20 09:45 1613计划将springsecurity的引入新的项目中。开始学习。 ... -
activeMO学习笔记二:发布和订阅
2012-01-16 14:57 1533其实学习activeMQ的初衷就是要找一个能够实现异步消息的发 ... -
cxf学习笔记之传递附件
2012-01-12 09:34 4748cxf是jws的实现,上传二进制文件主要借助MTOM来实现,只 ... -
cxf学习笔记之传递复杂对象
2012-01-10 14:52 3794设计思路,创建一个人员注册的web服务。接受客户端传递的人员信 ... -
ie的进度条总也走不完
2011-01-11 21:06 1210多年前就发现跑着的系统中,时常看见ie的进度条总也走不完。但事 ... -
什么是工作流?
2010-12-29 18:53 981项目要用到工作流,给自己补一课。 就是“业务过程的部分或整体 ... -
特定环境下的应用服务器的时差问题
2010-04-02 10:59 1304最近遇到希望的问题。在window2008+weblogic1 ... -
给tomcat的Dos窗口命名
2010-01-07 14:04 3207做javaee开发,离不了web容器,tomcat可以说是最常 ... -
cxf学习笔记之结合spring创建客户端
2009-12-28 18:46 1588这个比较迷惑人。。。至少对我这个初学者来说是如此。后面解释原因 ... -
cxf学习笔记之结合spring创建服务端
2009-12-28 18:43 2186刚起步时实际上服务端是最简单的。 一、加入cxf支持 简单的说 ... -
cxf学些过程中的一些问题
2009-12-27 18:24 38111、 2009-12-27 18:19:02 org.apac ... -
数据源的两种配置
2009-10-09 10:27 1199开发的应用系统通常可以对数据源进行多种配置。 1、开发过程中往 ... -
常量类与属性文件在开发中的使用技巧
2009-08-13 16:48 1065开发中经常会将一些常用的或常修改的数据记录到常量类或属性文件中 ... -
过滤器在web开发中的应用
2009-04-07 15:53 1081在现在的web开发中,使用Filter来完成一些支撑性的工作是 ... -
mvn and ssh融合问题及解决办法
2009-03-27 09:32 3623通过maven融合ssh(struts2+spring2.5+ ...
相关推荐
项目均经过测试,可正常运行! 环境说明: 开发语言:java JDK版本:jdk1.8 框架:springboot 数据库:mysql 5.7/8 数据库工具:navicat 开发软件:eclipse/idea
DBCHM 是一款数据库文档生成工具! 该工具从最初支持chm文档格式开始,通过开源,集思广益,不断改进,又陆续支持word、excel、pdf、html、xml、markdown等文档格式的导出。
功能说明:可以管理首页、个人中心、用户管理、旅行社管理、产品分类管理、门店公告管理、行政中心管理、订单信息管理、合同信息管理、社区留言、系统管理等功能模块。环境说明:开发语言:Java框架:springboot,mybatisJDK版本:JDK1.8数据库:mysql 5.7数据库工具:Navicat11开发软件:eclipse/ideaMaven包:Maven3.6
在信息化技术不断进步和现代经济快速发展的今天,传统的数据管理方式已经被软件化的存储、归纳和集中处理所取代。图书管理系统正是在这种背景下应运而生,旨在帮助管理者高效处理大量数据信息,提升事务处理效率,实现高效工作的目标。该系统采用成熟的SSM框架,利用跨平台的Java语言开发,数据库则选用广泛使用的MySQL,以满足大型商业网站的需求。 系统实现了用户在线选书、答题和查看考核分数的功能,同时,管理员可以进行字典管理、留言板管理、书籍管理、书籍收藏管理、书籍留言管理、书籍借阅订单管理、书籍挂失管理、书籍需求管理、用户管理和管理员管理等。图书管理系统的界面设计简洁美观,功能模块布局与同类网站保持一致,不仅实现了基本功能,还提供了数据安全问题的实用解决方案。该系统不仅提高了管理者处理工作事务的效率,而且实现了数据信息管理的整体化、规范化和自动化。
电子手轮Ver1.1(位置跟随,X轴或Y轴) 1.200smart、威纶通触摸屏 2.手轮或编码器+PLC+伺服驱动器 3.手轮接入PLC,伺服接Q0.0或Q0.1,手轮转动,伺服电机准确跟随。 4.采用PLS指令编写 5.不带加减速 6.可选择X轴或Y轴跟随手轮。
wzb剧集爬虫程序代码1
Python数据结构与算法-PPT课件.rar。内容来源于网络分享,如有侵权请联系我删除。另外如果没有积分的同学需要下载,请私信我。
收到防护服快快快啊啊啊啊啊
西门子s7 200smart与3台欧姆龙E5cc温控器通讯控 功能:可以直接应用现场 实现西门子s7 200smart对3台欧姆龙E5cc温控器进行485通讯控制,在触摸屏上设定温度,读取温度,设定探头型号,报警类型,报警值,报警上下限等功能。 程序有通讯故障后再恢复功能,也可以后续根据需要在此基础上扩充台数 器件:西门子s7 200smart ST20 PLC.昆仑通态MCGS ,3台欧姆龙E5cc温控器。 说明:的是程序,可以直接应用现场,带详细注释程序,触摸屏程序,PLC设置和温控器设置,接线说明书。
光伏-电池充电模型,可以很好的稳定直流输出电压。 采用最大功率跟踪MPPT算法,通过boost电路输出电压,电池侧采用电压电流PI双闭环控制,通过双向电路给电池充放电。 直流侧参考电压为48v。
基于 hadoop和hbase的电商交易记录的简单分析项目源码+文档说明.zip,含有代码注释,新手也可看懂,个人手打98分项目,导师非常认可的高分项目,毕业设计、期末大作业和课程设计高分必看,下载下来,简单部署,就可以使用。该项目可以直接作为毕设、期末大作业使用,代码都在里面,系统功能完善、界面美观、操作简单、功能齐全、管理便捷,具有很高的实际应用价值,项目都经过严格调试,确保可以运行! 基于 hadoop和hbase的电商交易记录的简单分析项目源码+文档说明.zip基于 hadoop和hbase的电商交易记录的简单分析项目源码+文档说明.zip基于 hadoop和hbase的电商交易记录的简单分析项目源码+文档说明.zip基于 hadoop和hbase的电商交易记录的简单分析项目源码+文档说明.zip基于 hadoop和hbase的电商交易记录的简单分析项目源码+文档说明.zip基于 hadoop和hbase的电商交易记录的简单分析项目源码+文档说明.zip基于 hadoop和hbase的电商交易记录的简单分析项目源码+文档说明.zip基于 hadoop和hbase的电商交易记录
三相异步电机直接转接控制系统simulink仿真
沈韬校长带队赴嵩明通用技术昆明机床考察交流 2.pdf
内容概要:本文从定义出发,详细介绍了HTTP协议的基础功能,发展历程,尤其是各版本的重要特点。之后重点讲解了HTTP的工作原理及其面临的安全问题和解决方案。最后总结了HTTP协议对未来互联网发展的贡献和前景。 适合人群:所有对网络基础知识感兴趣的技术初学者及开发者。 使用场景及目标:理解和掌握HTTP这一互联网基石性协议,从而能更好地从事web应用的设计与开发等工作。 阅读建议:建议先通读全文把握大意,对于不明白的概念可上网查找更多资料加深理解。同时,最好边学习理论知识边动手实践搭建简单的http服务来增强体验感。
016 - 搞笑顺口溜通用大全
杭电数电第二章课后答案
046 - 网络直播常用名词
091 - 直播主播场控经典语录
永磁同步电机矢量控制(磁场定向控制FOC)模型,一共有三个,分别是常规PI控制、滞环电流控制和滑膜速度控制,每个的控制效果都不错。
Bernsen算法的基本思想为:设置两个初始值T1=15和T2=128,计算以任意一个像素g为中心、大小为(2w+1)×(2w+1)窗口内的所有像素灰度值的最大值M与最小值N,得到M和N的均值T。若M-N>T1,则当前点的阈值为T;若M-N<T1,则表示该窗口所在区域灰度级差别较小,则窗口在目标区或在背景区,再判断T与T2的关系:若T>T2,则当前点的灰度值为255;否则,当前点g的灰度值为0。利用阈值T遍历图像中每个像素点,得到与原图像维数相同的二值化图像。该算法描述如下:设f(x,y)表示(x,y)处的像素灰度值,以(x,y)为中心、大小为(2w+1)×(2w+1)的区域S内的阈值为