On 7/30/07, Gregg Wonderly <[EMAIL PROTECTED]> wrote: > It makes sense to use read coil and set coil on coils. If modbus only > implemented coils and not status registers or otherwise, you'd agree that the > coil operations are uniform.
No, I wouldn't. If you told me that modbus could address any kind of resource (not just coils and status registers, but stock quotes, weather reports, invoices, ...), and that the operations were appropriate to all those things, only then it would be uniform. > The coils and registers are all uniquely numbered. There is no overlap. So, > every possible MODBUS resource can be referenced. It's just that some > operations on the MODBUS resources don't make sense. This is just like trying > to PUT or DELETE something that you either don't have access to, or which can > not carry out that action in HTTP. It's not the same. You're right that "read coil" on a status register doesn't make sense, but that's different than not being implemented. Not being implemented would be akin to having a coil whose status wasn't readable. > > > > GET means "retrieve me a representation of the identified thing". > > > > Everything can be represented, therefore it's uniform. > > > > > > Unless I'm misunderstanding something, you are not considering the issue > > of > > > allowed mime-types sent with the GET which can make the GET fail because > > a > > > particular type of result can not be sent. The use of multiple types of > > READ > > > operations in MODBUS is equivalent to an additional specification of > > MIME-TYPE. > > > > It's functionally equivalent, yes. It's not architecturally equivalent > > though. > > Perhaps you can explain the difference in a way that cleary shows how that > difference creates a problem or lack of functionality that is detrimental to a > MODBUS application and keeps it from working, or otherwise not being > effective? The only claim I've made about MODBUS is that its operations aren't uniform. > > > The coils have a particular address range (resource name) and the status > > > registers have another particular address range (resource name). You are > > still > > > convinced that the NAME of the operation is the only thing that makes the > > > delination of uniform or not. I think that's a bit short sighted. > > > > Not so much the name of the method, but its meaning. It's meaning has > > to be relevant to all things. That's by definition, you're not > > allowed to disagree with it! 8-) > > In HTTP, a particular URL structure indicates a particular resource types or > set > of resources. Not true. Each and every URL may identify a different type of thing. But clients don't generally need to know the type before they interact with it exactly because the interface is "type independent". > In MODBUS, a particular set of numeric values, are designated (no > standardized) to mean a particular set of resource types. The READCOIL > operation is uniform and has the same meaning for all COIL type things. Does it have the same meaning for registers? For stock quotes? For invoices? If not, then it isn't uniform. > Would it be more uniform for onlu POST to be used and then there be a > > Request-Type: put > > or > > Request-Type: delete > > header? Would that change the service's or protocol's ability to be RESTful? Yes, that would make it unRESTful because the meaning of Request-Type overrides the meaning of the request method, thereby making the message not self-descriptive. Mark. -- Mark Baker. Ottawa, Ontario, CANADA. http://www.markbaker.ca Coactus; Web-inspired integration strategies http://www.coactus.com
