{"id":2316,"date":"2017-03-16T17:40:56","date_gmt":"2017-03-16T17:40:56","guid":{"rendered":"http:\/\/grodansparadis.com\/wordpress\/?p=2316"},"modified":"2017-03-16T17:40:56","modified_gmt":"2017-03-16T17:40:56","slug":"vscp-register-abstraction-model-vscp-ram","status":"publish","type":"post","link":"https:\/\/grodansparadis.com\/wordpress\/?p=2316","title":{"rendered":"#VSCP Register Abstraction Model (VSCP-RAM)"},"content":{"rendered":"<p><a href=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/register_abstraction_layers.jpg\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"2317\" data-permalink=\"https:\/\/grodansparadis.com\/wordpress\/?attachment_id=2317\" data-orig-file=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/register_abstraction_layers.jpg?fit=794%2C1123&amp;ssl=1\" data-orig-size=\"794,1123\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"register_abstraction_layers\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/register_abstraction_layers.jpg?fit=580%2C820&amp;ssl=1\" class=\"alignnone size-full wp-image-2317\" src=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/register_abstraction_layers.jpg?resize=580%2C820\" alt=\"\" width=\"580\" height=\"820\" srcset=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/register_abstraction_layers.jpg?w=794&amp;ssl=1 794w, https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/register_abstraction_layers.jpg?resize=212%2C300&amp;ssl=1 212w, https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/register_abstraction_layers.jpg?resize=768%2C1086&amp;ssl=1 768w, https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/register_abstraction_layers.jpg?resize=724%2C1024&amp;ssl=1 724w\" sizes=\"auto, (max-width: 580px) 100vw, 580px\" \/><\/a><\/p>\n<p>The single most important part of a VSCP system is the <a href=\"http:\/\/www.vscp.org\/docs\/vscpspec\/doku.php?id=register_abstraction_model\">Register Abstraction Model<\/a>.\u00a0 With it you can describe anything that are real (or even not real) in this universe.\u00a0 Quite a piece of a powerful super tool to have in your arsenal.<\/p>\n<p>In the IoT world people often say that MQTT,\u00a0 CoAP,\u00a0 etc is IoT servers\/protocols. For me they are transport mechanisms. Good ones, at least in the case of MQTT.\u00a0 Useful for IoT? Yes. But IoT severs no?<\/p>\n<p>Now what!?<\/p>\n<p>To explain my point. Look at a web server. It serve content using the HTTP protocol. Simple enough. Works good. Quite similar to MQTT in fact.<\/p>\n<p>But&#8230;<\/p>\n<p>this was not the reason the world-wide web was a success.\u00a0 If everyone started to serve different non standardized content with the http protocol it would have been a mess of it all. Very hard to cope with for the web readers at least.\u00a0 Yes, it would have been useless. Well this was more or less the case also pre HTML.\u00a0 But what HTML did was to specify a common format for the content. That was the killer that made everything moving. Not the web server which is just the transport mechanism just as MQTT and others are in IoT.<\/p>\n<p>VSCP try to be more than a transport mechanism for m2m and IoT. A common way to look at and handle &#8220;things&#8221;.\u00a0 (yes MQTT can transport it just as CoAP and others can)<\/p>\n<p>In the picture above is a view on how VSCP look at a &#8220;<strong>thing<\/strong>&#8220;.\u00a0 A &#8220;<strong>thing<\/strong>&#8220;can be a TV,\u00a0 a refrigerator,\u00a0 a car,\u00a0 a lamp,\u00a0 a human or whatever. Everything can be described in this way. Yes, <strong>everything<\/strong>. Hardware as well as software or a some abstract non existing life form. <strong>ANYTHING<\/strong> is the world.<\/p>\n<p>To describe <strong>anything<\/strong> is of course not a problem. One just describe <strong>the anything<\/strong> in a way that comes up in one&#8217;s mind. So if we ask 999 people to describe <strong>the anything<\/strong> object there will be 999 different descriptions. That is actually OK. The problem is rather that there will be 999 different ways to interpret the descriptions of <strong>the anything.<\/strong> Hard work.<\/p>\n<p>If we instead came up with a common way to look at <strong>the anything<\/strong>,\u00a0 an abstraction of it,\u00a0 we could all use that abstraction to describe every <strong>the anything<\/strong> and after that we do not need to come up with so many new ways to interpret the descriptions nor ways to interact with <strong>the anythings<\/strong> of the world. We could even use this abstraction on top of any of the 999 description from above as it is useful for describing <strong>anything<\/strong>. Good if we love our &#8220;description&#8221; and don&#8217;t want to throw away our lovely description and interpretation of it.<\/p>\n<p>Of course, the abstraction would be most useful if it was available for a high-end system or user as well as for low-end system or user.\u00a0 Low end can actually be really\u00a0 low-end.\u00a0 So we better start there.\u00a0 But a high-end user or system demands handling of great complex things so we need to take this into account as well.<\/p>\n<p>VSCP solve this in the following way<\/p>\n<ul>\n<li>Everything can be described by a collection of\u00a0 <strong>8-bit registers<\/strong>.<\/li>\n<li>To know whats inside an 8-bit register you need the ability to <strong>read<\/strong> it.<strong><br \/>\n<\/strong><\/li>\n<li>To change the content of an 8-bit register you need the ability to <strong>write<\/strong> it.<\/li>\n<\/ul>\n<p>So VSCP can describe everything in the universe,\u00a0 yes everything from a flower,\u00a0 a person,\u00a0 a car or anything else with a set of 8-bit registers. The only thing needed to interact with the resister set is that registers can be read and written.<\/p>\n<p>So<\/p>\n<ul>\n<li><strong>Read<\/strong> a byte.<\/li>\n<li><strong>Write<\/strong> a byte.<\/li>\n<\/ul>\n<p>is all that is needed for\u00a0 VSCP to work with \u201c<strong>anything<\/strong>\u201d on its lowest level.<\/p>\n<p>In VSCP this is called the <a href=\"http:\/\/www.vscp.org\/docs\/vscpspec\/doku.php?id=register_abstraction_model\"><strong>Register Abstraction Model<\/strong><\/a>.<\/p>\n<p>VSCP\u2019s register abstraction model demands that all \u201c<strong>anything<\/strong>\u201d objects have a set of registers that contain specific information. Same on all. The two most important parts is <a href=\"http:\/\/www.vscp.org\/docs\/vscpspec\/doku.php?id=globally_unique_identifiers\">GUID, ett globally unique id<\/a>\u00a0 a 16 byte world unique if for &#8220;<strong>the anything<\/strong>&#8220;,\u00a0 and a 32-byte area which contains a pointer to a\u00a0 <a href=\"http:\/\/www.vscp.org\/docs\/vscpspec\/doku.php?id=module_description_file\">Module Description File<\/a>.\u00a0 The GUID identifies &#8220;<strong>the anything<\/strong>&#8221; much the same way as an Ethernet MAC does for Ethernet device.\u00a0 They can actually be coupled. The MDF pointer can point at a local location or to a file on the Internet. The content is a well-defined XML description of &#8220;the anything&#8221;.<\/p>\n<p>One thing that is described is of course the registers of &#8220;<strong>the anything<\/strong>&#8220;.\u00a0 But to handle things on a register level can be to hard sometimes. For instance is a floating point value stored in eight registers. If this floating point value for instance represent a temperature of &#8220;the anything&#8221;\u00a0 and this is what the application or user is interested in there should be no need to know how it is actually stored on &#8220;<strong>the anything<\/strong>&#8220;.<\/p>\n<p>So to make life easier for high-end systems or users the MDF often also contains abstractions. Abstractions specify higher end type such as strings, floats, integers, booleans and tell in what registers they are stored and also how many bytes they use.\u00a0 So a high en user just handle these higher end objects, reading and writing them,\u00a0 even if the system still only read and write bytes.<\/p>\n<p>Both registers and abstractions describe the same &#8220;<strong>anything<\/strong>&#8220;,\u00a0 just on different levels.<\/p>\n<p>At this point it would be possible to build an application that can configure any device, &#8220;<strong>anything<\/strong>&#8220;,\u00a0 just by read\/write byte operations and by reading and interpreting the MDF of the unit. The user (or machine) just fill in the values. The same application can be used to configure a car,\u00a0 a TV,\u00a0 a clock radio etc.<\/p>\n<p>The MDF can also contain wizards. A wizard can guide a human user, step by step through a specific setup of a device. They are also described in an abstract way and can be interpreted by C\/C++, JavaScript and other higher end programing languages alike.\u00a0 So it is as easy to make an app. that goes through the wizard steps as it is to make an HTML page that do the same.<\/p>\n<p>It is of course possible to use XML\/JSON on the higher level to &#8220;set register\/abstractions&#8221;.\u00a0 A read and a write byte operation is still all that is needed.<\/p>\n<p>The fact is that the register abstraction model is so light weight that it easily can live alongside a more proprietary solution<\/p>\n<p>But way?<\/p>\n<p>That you have to think about yourself&#8230; ,-)<\/p>\n<p><strong>ps<\/strong> VSCP is of course a lot more than this. There are events, classes\/types, bootloaders, decision matrices and a lot of other clever things. <strong>ds<\/strong>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The single most important part of a VSCP system is the Register Abstraction Model.\u00a0 With it you can describe anything that are real (or even not real) in this universe.\u00a0 Quite a piece of a powerful super tool to have in your arsenal. In the IoT world people often say that MQTT,\u00a0 CoAP,\u00a0 etc is [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[13],"tags":[],"class_list":["post-2316","post","type-post","status-publish","format-standard","hentry","category-vscp"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p4raCZ-Bm","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/grodansparadis.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/2316","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/grodansparadis.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/grodansparadis.com\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/grodansparadis.com\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/grodansparadis.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2316"}],"version-history":[{"count":1,"href":"https:\/\/grodansparadis.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/2316\/revisions"}],"predecessor-version":[{"id":2318,"href":"https:\/\/grodansparadis.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/2316\/revisions\/2318"}],"wp:attachment":[{"href":"https:\/\/grodansparadis.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2316"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/grodansparadis.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2316"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/grodansparadis.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2316"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}